Skip to content

Commit fa35749

Browse files
Fix bugs in capture group definitions for start and end of strings
1 parent b4eb108 commit fa35749

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

AutoIt.tmLanguage

+15-5
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,19 @@
4242
<key>name</key>
4343
<string>string.parameter.import.autoit</string>
4444
</dict>
45+
<key>2</key>
46+
<dict>
47+
<key>name</key>
48+
<string>punctuation.definition.string.begin.import.autoit</string>
49+
</dict>
50+
<key>3</key>
51+
<dict>
52+
<key>name</key>
53+
<string>punctuation.definition.string.end.import.autoit</string>
54+
</dict>
4555
</dict>
4656
<key>match</key>
47-
<string>#\b(?i:include|include-once)\b(.*)$</string>
57+
<string>#(?i:include|include-once)\s+((["'&lt;]).*(["'&gt;]))$</string>
4858
<key>name</key>
4959
<string>keyword.control.import.autoit</string>
5060
</dict>
@@ -94,7 +104,7 @@
94104
</dict>
95105
<dict>
96106
<key>begin</key>
97-
<string>"</string>
107+
<string>(")</string>
98108
<key>beginCaptures</key>
99109
<dict>
100110
<key>1</key>
@@ -104,7 +114,7 @@
104114
</dict>
105115
</dict>
106116
<key>end</key>
107-
<string>"(?!")|^</string>
117+
<string>(")(?!")|^</string>
108118
<key>endCaptures</key>
109119
<dict>
110120
<key>1</key>
@@ -135,7 +145,7 @@
135145
</dict>
136146
<dict>
137147
<key>begin</key>
138-
<string>'</string>
148+
<string>(')</string>
139149
<key>beginCaptures</key>
140150
<dict>
141151
<key>1</key>
@@ -145,7 +155,7 @@
145155
</dict>
146156
</dict>
147157
<key>end</key>
148-
<string>'(?!')|^</string>
158+
<string>(')(?!')|^</string>
149159
<key>endCaptures</key>
150160
<dict>
151161
<key>1</key>

Comments.tmPreferences

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<key>name</key>
1515
<string>TM_COMMENT_START</string>
1616
<key>value</key>
17-
<string>;</string>
17+
<string>; </string>
1818
</dict>
1919
<dict>
2020
<key>name</key>

0 commit comments

Comments
 (0)