D6858: Fix replaceCaptures() to work with more than 9 captures

Dominik Haumann noreply at phabricator.kde.org
Sun Jul 23 17:29:43 UTC 2017


dhaumann created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Currently, the for loop iterates from 1...n, which is an issue, if n > 9.
  
  Luckily, this so far was never an issue, since we typically have only one or two captures in dynamic context rules.
  
  Additionally, the helper function to escape the regexp is removed in favor of QRegularExpression::escape().

TEST PLAN
  make test still works.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D6858

AFFECTED FILES
  src/lib/rule.cpp

To: dhaumann, vkrause
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170723/41d2face/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list