Skip to content

Commit 005e9ef

Browse files
committed
Fix highlighting of scoped functions
1 parent ef11edf commit 005e9ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Support/PowershellSyntax.tmLanguage

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@
522522
<key>function</key>
523523
<dict>
524524
<key>begin</key>
525-
<string>(?&lt;!\S)((?i:function|filter|configuration|workflow))\s+((?:\p{L}|\d|_|-|\.)+)</string>
525+
<string>(?&lt;!\S)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)</string>
526526
<key>beginCaptures</key>
527527
<dict>
528528
<key>0</key>
@@ -536,6 +536,11 @@
536536
<string>storage.type</string>
537537
</dict>
538538
<key>2</key>
539+
<dict>
540+
<key>name</key>
541+
<string>storage.modifier.scope.powershell</string>
542+
</dict>
543+
<key>3</key>
539544
<dict>
540545
<key>name</key>
541546
<string>entity.name.function.powershell</string>

0 commit comments

Comments
 (0)