From 250707d716cf13219d7897fde8d4bf087121cb49 Mon Sep 17 00:00:00 2001 From: mataha Date: Mon, 6 Nov 2023 17:19:43 +0100 Subject: [PATCH] [Batch File] Expand comment scope to subsequent colons This addresses the concern expressed in #3865. --- Batch File/Batch File.sublime-syntax | 2 +- Batch File/tests/syntax_test_batch_file.bat | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Batch File/Batch File.sublime-syntax b/Batch File/Batch File.sublime-syntax index 1c89bb3173..357bdc4e8f 100644 --- a/Batch File/Batch File.sublime-syntax +++ b/Batch File/Batch File.sublime-syntax @@ -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}}]' diff --git a/Batch File/tests/syntax_test_batch_file.bat b/Batch File/tests/syntax_test_batch_file.bat index 0e2258284e..48bb5676f4 100644 --- a/Batch File/tests/syntax_test_batch_file.bat +++ b/Batch File/tests/syntax_test_batch_file.bat @@ -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