Fix replaceCaptures() to work with more than 9 captures
ClosedPublic

Authored by dhaumann on Jul 23 2017, 5:29 PM.

Details

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.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dhaumann created this revision.Jul 23 2017, 5:29 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 23 2017, 5:29 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
vkrause accepted this revision.Jul 23 2017, 9:55 PM
This revision is now accepted and ready to land.Jul 23 2017, 9:55 PM
This revision was automatically updated to reflect the committed changes.