Skip to content

Commit fc2a333

Browse files
Autohotkey: Improved tag pattern (#2920)
1 parent a62ef79 commit fc2a333

File tree

4 files changed

+62
-5
lines changed

4 files changed

+62
-5
lines changed

components/prism-autohotkey.js

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-autohotkey.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
A.invert({1:"a", 2:"A"})
2+
; => {"a":2}
3+
4+
NormalLabel:
5+
; do something
6+
return
7+
TabbedLabel:
8+
; do something
9+
return
10+
Sus{}//[]Label:
11+
; do something
12+
return
13+
14+
----------------------------------------------------
15+
16+
[
17+
"A",
18+
["operator", "."],
19+
["function", "invert"],
20+
["punctuation", "("],
21+
["punctuation", "{"],
22+
["number", "1"],
23+
["punctuation", ":"],
24+
["string", "\"a\""],
25+
["punctuation", ","],
26+
["number", "2"],
27+
["punctuation", ":"],
28+
["string", "\"A\""],
29+
["punctuation", "}"],
30+
["punctuation", ")"],
31+
32+
["comment", "; => {\"a\":2}"],
33+
34+
["tag", "NormalLabel"], ["punctuation", ":"],
35+
["comment", "; do something"],
36+
["selector", "return"],
37+
["tag", "TabbedLabel"], ["punctuation", ":"],
38+
["comment", "; do something"],
39+
["selector", "return"],
40+
["tag", "Sus{}//[]Label"], ["punctuation", ":"],
41+
["comment", "; do something"],
42+
["selector", "return"]
43+
]
+13-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
foo:
22
foo_bar:
33

4+
validLabel: ; a comment
5+
/* multiline comment
6+
*/ validLabel:
7+
48
----------------------------------------------------
59

610
[
7-
["tag", "foo"],
11+
["tag", "foo"], ["punctuation", ":"],
12+
["tag", "foo_bar"], ["punctuation", ":"],
13+
14+
["tag", "validLabel"],
815
["punctuation", ":"],
9-
["tag", "foo_bar"],
16+
["comment", "; a comment"],
17+
18+
["comment", "/* multiline comment\r\n*/"],
19+
["tag", "validLabel"],
1020
["punctuation", ":"]
1121
]
1222

1323
----------------------------------------------------
1424

15-
Checks for tags (labels).
25+
Checks for tags (labels).

0 commit comments

Comments
 (0)