Skip to content

Commit 6660779

Browse files
committed
1 parent b062be9 commit 6660779

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Support/PowershellSyntax.tmLanguage

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,10 @@
255255
<string>entity.name.function</string>
256256
</dict>
257257
</dict>
258+
<key>comment</key>
259+
<string>capture should be entity.name.type, but it doesn't provide a good color in the default schema.</string>
258260
<key>match</key>
259-
<string>(?&lt;!\w)((?i:class|workflow)|%|\?)(?:\s)+(\w+)\b</string>
261+
<string>(?&lt;!\w)((?i:class)|%|\?)(?:\s)+((?:\p{L}|\d|_|-|)+)\b</string>
260262
</dict>
261263
<dict>
262264
<key>match</key>
@@ -511,7 +513,7 @@
511513
<key>function</key>
512514
<dict>
513515
<key>begin</key>
514-
<string>((?i:function|configuration))\s+((?:\p{L}|\d|_|-)+)</string>
516+
<string>((?i:function|configuration|workflow))\s+((?:\p{L}|\d|_|-|\.)+)</string>
515517
<key>beginCaptures</key>
516518
<dict>
517519
<key>0</key>

tests/samples/test-file.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ function echo([string]$text) {
5959
write-host $text
6060
}
6161

62-
# declaration should be consistent
63-
function foo() {}
62+
# declarations should be consistent
63+
function foo.bar() {}
6464
Function foo() {}
6565

6666
class A {}
67-
Class Foo {}
67+
Class Foo-Bar {}
6868

6969
workflow w1 {}
7070
Workflow work {}

0 commit comments

Comments
 (0)