Skip to content
Commit a2414495 authored by Nibaldo González's avatar Nibaldo González Committed by Christoph Cullmann
Browse files

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:
{F6715422}

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
parent e8f6b354
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment