Skip to content

Commit

Permalink
[XML] Fix folding of tags with fully qualified names
Browse files Browse the repository at this point in the history
This commit fixes an issue, which confused syntax based folding, if fully
qualified tag names are involved.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Data">
        <xs:complexType>
            <xs:sequence>
                <!--Allowing arbitrary element names-->
                <xs:any maxOccurs="unbounded" processContents="lax"/>
            </xs:sequence>
            <!--Element names must be unique-->
            <xs:assert test="every $child in * satisfies not($child/preceding::*[name() = name($child)])"></xs:assert>
        </xs:complexType>
    </xs:element>
</xs:schema>
```
  • Loading branch information
deathaxe committed Jul 25, 2023
1 parent 73b7892 commit 68d7399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XML/Fold.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
Note: Works only if closing punctuation is already on a separate line.
-->
<key>begin</key>
<string>meta.tag entity.name.tag</string>
<string>meta.tag entity.name.tag.localname</string>
<key>end</key>
<string>meta.tag punctuation.definition.tag</string>
<key>excludeTrailingNewlines</key>
Expand Down

0 comments on commit 68d7399

Please sign in to comment.