Skip to content

Commit 0a7a969

Browse files
committed
Preserve comments from removed YAML
1 parent b76aa20 commit 0a7a969

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Support/PowershellSyntax.tmLanguage

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<string>PowerShell</string>
1313
<key>patterns</key>
1414
<array>
15+
<dict>
16+
<key>comment</key>
17+
<string>First match comments</string>
18+
</dict>
1519
<dict>
1620
<key>begin</key>
1721
<string>&lt;#</string>
@@ -56,6 +60,10 @@
5660
</dict>
5761
</array>
5862
</dict>
63+
<dict>
64+
<key>comment</key>
65+
<string>Then match top-level script content</string>
66+
</dict>
5967
<dict>
6068
<key>include</key>
6169
<string>#commands</string>
@@ -801,6 +809,10 @@
801809
<key>match</key>
802810
<string>(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b</string>
803811
</dict>
812+
<dict>
813+
<key>comment</key>
814+
<string>then, there are four variations on variables, in general: with and without scope, and with and without curly braces</string>
815+
</dict>
804816
<dict>
805817
<key>captures</key>
806818
<dict>
@@ -1016,6 +1028,10 @@
10161028
<key>match</key>
10171029
<string>(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))\b</string>
10181030
</dict>
1031+
<dict>
1032+
<key>comment</key>
1033+
<string>then, there are four variations on variables, in general: with and without scope, and with and without curly braces</string>
1034+
</dict>
10191035
<dict>
10201036
<key>captures</key>
10211037
<dict>

0 commit comments

Comments
 (0)