<table><tr><td style="">nibags created this revision.<br />nibags added reviewers: Framework: Syntax Highlighting, dhaumann, cullmann, vkrause, jpoelen.<br />Herald added projects: Kate, Frameworks.<br />Herald added subscribers: kde-frameworks-devel, kwrite-devel.<br />nibags requested review of this revision.
</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/D24378">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>In WordDetect rules, verify delimiter characters also on the right and left edges inside the string.</p>

<p>For example:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><WordDetect attribute="Keyword" String="<hello"/></pre></div>

<p>In the past, this rule was equivalent to <tt style="background: #ebebeb; font-size: 13px;">\b<hello\b</tt> in regular expression. Now, it's equivalent to <tt style="background: #ebebeb; font-size: 13px;"><hello\b</tt>, since <tt style="background: #ebebeb; font-size: 13px;"><</tt> is a delimiter character.</p>

<p>I have checked the WordDetect rules in all definitions and and I haven't seen regressions. In the definitions <tt style="background: #ebebeb; font-size: 13px;">elm.xml</tt>, <tt style="background: #ebebeb; font-size: 13px;">selinux-cil.xml</tt> and <tt style="background: #ebebeb; font-size: 13px;">selinux-fc.xml</tt> I replaced some WordDetect rules with StringDetect, since in this change they are equivalent.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>make test</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>fix-worddetect</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24378">https://phabricator.kde.org/D24378</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/delimiters_WordDetect.delWordDetect.fold<br />
autotests/html/delimiters_WordDetect.delWordDetect.html<br />
autotests/input/delimiters_WordDetect.delWordDetect<br />
autotests/input/syntax/delimiters_WordDetect.xml<br />
autotests/reference/delimiters_WordDetect.delWordDetect.ref<br />
data/syntax/elm.xml<br />
data/syntax/selinux-cil.xml<br />
data/syntax/selinux-fc.xml<br />
src/lib/rule.cpp</div></div></div><br /><div><strong>To: </strong>nibags, Framework: Syntax Highlighting, dhaumann, cullmann, vkrause, jpoelen<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>