<table><tr><td style="">nibags created this revision.<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/D19999">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>BUG: 405585</p>
<p>There is a problem of folding in rules with beginRegion + endRegion.</p>
<p>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);">xml
<StringDetect String="hello" endRegion="region1" beginRegion="region2" /></pre></div>
<p>In this case, the "hello" string is part of the "region1" and "region2" regions simultaneously, which generates folding problems. The ideal behavior is that "hello" isn't part of "region1", but of "region2". That is, don't publish length of endRegion folding in rules with beginRegion+endRegion.</p>
<p>The following XML files use rules with beginRegion + endRegion:</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);">ansforth94.xml apparmor.xml asciidoc.xml asp.xml c.xml cisco.xml desktop.xml fortran.xml
haml.xml ini.xml isocpp.xml julia.xml lex.xml lua.xml makefile.xml perl.xml pony.xml
rhtml.xml rpmspec.xml ruby.xml template-toolkit.xml txt2tags.xml yacc.xml</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>folding-endRegion-beginRegion</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19999">https://phabricator.kde.org/D19999</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/Makefile.fold<br />
autotests/folding/folding.cpp.fold<br />
autotests/folding/highlight.asp.fold<br />
autotests/folding/highlight.cpp.fold<br />
autotests/folding/highlight.f90.fold<br />
autotests/folding/highlight.lex.fold<br />
autotests/folding/highlight.pl.fold<br />
autotests/folding/highlight.pony.fold<br />
autotests/folding/highlight.prg.fold<br />
autotests/folding/highlight.rb.fold<br />
autotests/folding/highlight.spec.fold<br />
autotests/folding/highlight.t2t.fold<br />
autotests/folding/highlight.y.fold<br />
autotests/folding/test.desktop.fold<br />
autotests/folding/test.ini.fold<br />
autotests/folding/usr.bin.apparmor-profile-test.fold<br />
autotests/html/test.desktop.html<br />
autotests/input/test.desktop<br />
autotests/reference/test.desktop.ref<br />
src/lib/abstracthighlighter.cpp</div></div></div><br /><div><strong>To: </strong>nibags<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>