Fix endRegion folding in rules with beginRegion+endRegion (use length=0)
Summary:
BUG: 405585
There is a problem of folding in rules with beginRegion + endRegion.
Example:
<StringDetect String="hello" endRegion="region1" beginRegion="region2" />
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.
For example, in .desktop files:
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
Reviewers: Framework: Syntax Highlighting, cullmann, dhaumann, vkrause
Reviewed By: Framework: Syntax Highlighting, cullmann
Subscribers: kwrite-devel, kde-frameworks-devel
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D19999