diff --git a/language/ahk.tmLanguage.yaml b/language/ahk.tmLanguage.yaml index 30463a2c..1066d9aa 100644 --- a/language/ahk.tmLanguage.yaml +++ b/language/ahk.tmLanguage.yaml @@ -73,7 +73,7 @@ repository: name: entity.name.function.label.ahk '2': name: punctuation.definition.equals.colon - match: ^\s*(.+)(::) + match: ^\s*([^\"]+)(::) name: hotkeyline.ahk example: '^c::' function-call: diff --git a/src/test/suite/grammar/samples/54-double-colon-in-string.ahk b/src/test/suite/grammar/samples/54-double-colon-in-string.ahk new file mode 100644 index 00000000..6133872e --- /dev/null +++ b/src/test/suite/grammar/samples/54-double-colon-in-string.ahk @@ -0,0 +1,3 @@ +;[#54 in AHK+](https://github.com/vscode-autohotkey/autohotkey-plus/issues/54) +Hotstring("::ykhis", "you know how it is") +Hotstring(":C:OOS", "out-of::-spec") \ No newline at end of file diff --git a/src/test/suite/grammar/samples/54-double-colon-in-string.ahk.snap b/src/test/suite/grammar/samples/54-double-colon-in-string.ahk.snap new file mode 100644 index 00000000..e74e8bfb --- /dev/null +++ b/src/test/suite/grammar/samples/54-double-colon-in-string.ahk.snap @@ -0,0 +1,27 @@ +>;[#54 in AHK+](https://github.com/vscode-autohotkey/autohotkey-plus/issues/54) +#^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk +>Hotstring("::ykhis", "you know how it is") +#^^^^^^^^^ source.ahk entity.name.function.ahk +# ^ source.ahk punctuation.bracket.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.begin.ahk +# ^^^^^^^ source.ahk string.quoted.double.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.end.ahk +# ^ source.ahk punctuation.ahk +# ^ source.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.begin.ahk +# ^^^^^^^^^^^^^^^^^^ source.ahk string.quoted.double.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.end.ahk +# ^ source.ahk punctuation.bracket.ahk +>Hotstring(":C:OOS", "out-of::-spec") +#^^^^^^^^^ source.ahk entity.name.function.ahk +# ^ source.ahk punctuation.bracket.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.begin.ahk +# ^^^^^^ source.ahk string.quoted.double.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.end.ahk +# ^ source.ahk punctuation.ahk +# ^ source.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.begin.ahk +# ^^^^^^^^^^^^^ source.ahk string.quoted.double.ahk +# ^ source.ahk string.quoted.double.ahk punctuation.definition.string.end.ahk +# ^ source.ahk punctuation.bracket.ahk \ No newline at end of file