Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: colon comment highlight #358

Merged
merged 2 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions language/ahk.tmLanguage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ repository:
comment:
patterns:
- captures:
'1':
'2':
name: punctuation.definition.comment.ahk
match: (?<=^|\s+)(;).*
match: (^\s*|\s+)(;).*
name: comment.line.semicolon.ahk
example: ;comment
- begin: ^\s*/\*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
>ToolTip ;Comment
#^^^^^^^ source.ahk support.function.ahk
# ^ source.ahk
# ^ source.ahk comment.line.semicolon.ahk
# ^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^ source.ahk comment.line.semicolon.ahk
>ToolTip;NotComment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#^^^ source.ahk entity.name.function.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^ source.ahk
# ^ source.ahk comment.line.semicolon.ahk
# ^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^ source.ahk comment.line.semicolon.ahk
>
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk comment.line.semicolon.ahk
# ^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
>Gui, Add, UpDown, Horz 0x80
Expand Down Expand Up @@ -524,7 +524,7 @@
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^ source.ahk constant.numeric.ahk
# ^ source.ahk
# ^ source.ahk comment.line.semicolon.ahk
# ^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
>Gui, Add, Tab3, Buttons, General|Settings
Expand Down
3 changes: 3 additions & 0 deletions src/test/suite/grammar/samples/357-colon-comment.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; [Issue #357](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/357)
; Test::Comment
; Test::Comment
11 changes: 11 additions & 0 deletions src/test/suite/grammar/samples/357-colon-comment.ahk.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
>; [Issue #357](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/357)
#^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
>; Test::Comment
#^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
> ; Test::Comment
#^^^^ source.ahk comment.line.semicolon.ahk
# ^ source.ahk comment.line.semicolon.ahk punctuation.definition.comment.ahk
# ^^^^^^^^^^^^^^ source.ahk comment.line.semicolon.ahk
>
188 changes: 94 additions & 94 deletions src/test/suite/grammar/samples/ahk-explorer.ahk.snap

Large diffs are not rendered by default.