Skip to content

Commit

Permalink
[Batch File] Expand comment scope to subsequent colons
Browse files Browse the repository at this point in the history
This addresses the concern expressed in #3865.
  • Loading branch information
mataha committed Nov 6, 2023
1 parent 375ccbf commit 250707d
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 250707d

Please sign in to comment.