sublimehq / Packages

Syntax highlighting files shipped with Sublime Text and Sublime Merge
https://sublimetext.com
Other
2.95k stars 587 forks source link

[Batch File] Fix empty comments exceeding to next line #4000

Closed deathaxe closed 2 months ago

deathaxe commented 3 months ago

This commit fixes "label comment" related patterns, to only scope leading colons punctuation.definition.comment.

Label comments make use of invalid labels being ignored. A label is invalid, if the first character after leading colon is a "metachar".

A label starting with :: is already an invalid label and thus can be followed by any (meta) char to still be a "valid" comment.

The wrong pattern was the real reason for the issue addressed by PR #3992.