Skip to content

Commit e740e28

Browse files
committed
fix xpath indentation by removing indentationRules from language-configuration.json
1 parent 2fa3a4c commit e740e28

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

language-configuration.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,5 @@
2929
"end": "^\\s*//\\s*#?endregion\\b"
3030
}
3131
},
32-
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
33-
"indentationRules": {
34-
"increaseIndentPattern": "^((?!.*?\\/\\*).*\\*\/)?\\s*[\\}\\]].*$",
35-
"decreaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"
36-
}
32+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\<\\>\\/\\?\\s]+)"
3733
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
},
4242
"[xsl]": {
4343
"editor.semanticHighlighting.enabled": true
44+
},
45+
"[xpath]": {
46+
"editor.semanticHighlighting.enabled": true
4447
}
4548
},
4649
"contributes": {

sample/importSat.xsl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010

1111
<xsl:import href="sat.xsl"/>
1212

13-
<xsl:variable name="test" as="xs:string" select="$map ! ?a"/>
13+
<xsl:variable name="test" as="xs:string" select="$map.new ! ?a"/>
1414

15-
<xsl:variable name="map" as="xs:string" select="map {'a': 1}"/>
15+
<xsl:variable name="map.new" as="xs:string" select="
16+
let $a := map {
17+
'a': ('test')
18+
}
19+
return $a"/>
1620

1721
</xsl:stylesheet>

sample/indent.xpath

Whitespace-only changes.

xsl-language-configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
"end": "^\\s*<\\?endregion\\s*.*\\?>"
3232
}
3333
},
34-
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\[\\!\\(\\/\\`\\~\\#\\%\\^\\&\\*\\)\\-\\=\\+\\{\\]\\}\\\\\\|\\;\\'\\\"\\,\\.\\<\\>\\?\\s]+)"
34+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\[\\!\\(\\/\\`\\~\\#\\%\\^\\&\\*\\)\\-\\=\\+\\{\\]\\}\\\\\\|\\;\\'\\\"\\,\\<\\>\\?\\s]+)"
3535
}

0 commit comments

Comments
 (0)