D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
nibags created this revision. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. nibags requested review of this revision. REVISION SUMMARY BUG: 405585 There is a problem of folding in rules with beginRegion + endRegion. Example: xml 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. The following XML files use rules with beginRegion + endRegion: 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 REPOSITORY R216 Syntax Highlighting BRANCH folding-endRegion-beginRegion REVISION DETAIL https://phabricator.kde.org/D1 AFFECTED FILES autotests/folding/Makefile.fold autotests/folding/folding.cpp.fold autotests/folding/highlight.asp.fold autotests/folding/highlight.cpp.fold autotests/folding/highlight.f90.fold autotests/folding/highlight.lex.fold autotests/folding/highlight.pl.fold autotests/folding/highlight.pony.fold autotests/folding/highlight.prg.fold autotests/folding/highlight.rb.fold autotests/folding/highlight.spec.fold autotests/folding/highlight.t2t.fold autotests/folding/highlight.y.fold autotests/folding/test.desktop.fold autotests/folding/test.ini.fold autotests/folding/usr.bin.apparmor-profile-test.fold autotests/html/test.desktop.html autotests/input/test.desktop autotests/reference/test.desktop.ref src/lib/abstracthighlighter.cpp To: nibags Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
nibags edited the summary of this revision. nibags added reviewers: Framework: Syntax Highlighting, cullmann, dhaumann, vkrause. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D1 To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, vkrause Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
nibags edited the summary of this revision. REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D1 To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, vkrause Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
dhaumann added a comment. Looks good to me. Anyone else? REPOSITORY R216 Syntax Highlighting REVISION DETAIL https://phabricator.kde.org/D1 To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, vkrause Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
cullmann accepted this revision. cullmann added a comment. This revision is now accepted and ready to land. I think this is a reasonable change! Thanks. REPOSITORY R216 Syntax Highlighting BRANCH folding-endRegion-beginRegion REVISION DETAIL https://phabricator.kde.org/D1 To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, vkrause Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D19999: Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
This revision was automatically updated to reflect the committed changes. Closed by commit R216:a24144952688: Fix endRegion folding in rules with beginRegion+endRegion (use length=0) (authored by nibags, committed by cullmann). REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D1?vs=54619&id=54670 REVISION DETAIL https://phabricator.kde.org/D1 AFFECTED FILES autotests/folding/Makefile.fold autotests/folding/folding.cpp.fold autotests/folding/highlight.asp.fold autotests/folding/highlight.cpp.fold autotests/folding/highlight.f90.fold autotests/folding/highlight.lex.fold autotests/folding/highlight.pl.fold autotests/folding/highlight.pony.fold autotests/folding/highlight.prg.fold autotests/folding/highlight.rb.fold autotests/folding/highlight.spec.fold autotests/folding/highlight.t2t.fold autotests/folding/highlight.y.fold autotests/folding/test.desktop.fold autotests/folding/test.ini.fold autotests/folding/usr.bin.apparmor-profile-test.fold autotests/html/test.desktop.html autotests/input/test.desktop autotests/reference/test.desktop.ref src/lib/abstracthighlighter.cpp To: nibags, #framework_syntax_highlighting, cullmann, dhaumann, vkrause Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann