Skip to content

Commit

Permalink
[Batch File] Expand comment scope to subsequent colons (sublimehq#3866)
Browse files Browse the repository at this point in the history
This addresses the concern expressed in sublimehq#3865.
  • Loading branch information
mataha authored Nov 7, 2023
1 parent 52dcf9a commit 40d269d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Batch File/Batch File.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ variables:
eoc: (?=\s*{{eoc_char}})
eoc_char: '[\n|&]'

label_comment: ':[^{{label_start}}]'
label_comment: ':+[^{{label_start}}]'
label_start: '[^{{metachar}}:+]'

path_terminator_chars: '[\s,;"{{redir_or_eoc_char}}]'
Expand Down
4 changes: 4 additions & 0 deletions Batch File/tests/syntax_test_batch_file.bat
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ continuation
:: <- - comment
:: ^^^^^^^^^ - comment

::: Me too!
:: ^^^ punctuation.definition.comment.dosbatch
:: ^^^^^^^^^^^ comment.line.colon.dosbatch

:: Me too!
:: ^^ punctuation.definition.comment.dosbatch
:: ^^^^^^^^^^ comment.line.colon.dosbatch
Expand Down

0 comments on commit 40d269d

Please sign in to comment.