<table><tr><td style="">nibags edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-qw5ftjejou3kezp/">(Show Details)</a><br />nibags added reviewers: cullmann, dhaumann, Framework: Syntax Highlighting.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15397">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">### Fix incorrect bracket closures in RegExp patterns<br />
<br />
BUG: 364866<br />
<br />
Recursive subgroups are added inside brackets `{}` and `()`, to avoid incorrect closures in RegExp patterns. This correction is in accordance with other text editors (VS Code, Atom, gedit & Sublime Text), which highlight the RegExp patterns in that way.<br />
{F6247870}<br />
<br />
### Allow strings as scalar references<br />
<br />
BUG: 348765<br />
<br />
Previously, the characters `"` and `'` were escaped, which caused an erroneous highlight when using references such as `\'string'` (see ref. [1] and [2]).<br />
{F6247874}<br />
<br />
### Fix incorrect highlighting of variables that start with underscores<br />
<br />
BUG: 355300<br />
<br />
This error was caused by the order of the RegExpr rules to detect variables: `[@\$][\+\-_]` had priority over `\$[#_][\w_]` (`$_` is a special variable) (ref. [3] & [4]).<br />
{F6247872}<br />
<br />
### Fix incorrect highlighting of characters in variables<br />
<br />
BUG: 391577<br />
<br />
Previously, characters such as `()[]}` were highlighted after `*` in some variables, such as `@*)`, causing incorrect closures of brackets. <br />
{F6247871}<br />
<br />
### Other fixes:<br />
<br />
* Add variables with carret, such as: `${^Foo}` or `$^V` (ref. [3]).<br />
* Add special variables: `%+`, `%-`, `%!` & `%^H` (ref. [3]).<br />
* Missing escapes are added, such as `\x{NN..}`, `\o{NN..}` (full list in ref. [5]).<br />
<br />
<br />
**References:**<br />
<br />
* [1] Perl References: https://gist.github.com/afair/2402068<br />
* [2] PerlMonks. Constant string reference: https://www.perlmonks.org/?node_id=413500<br />
* [3] Perl Programming Documentation. perlvar: https://perldoc.perl.org/perlvar.html<br />
* [4] PerlMonks. Perl Special Variables Quick Reference: https://www.perlmonks.org/?node_id=353259<br />
* [5] Perl Programming Documentation. perlrebackslash: https://perldoc.perl.org/perlrebackslash.html<br />
</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15397">https://phabricator.kde.org/D15397</a></div></div><br /><div><strong>To: </strong>nibags, cullmann, dhaumann, Framework: Syntax Highlighting<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>