Skip to content
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 6af714d commit 6760efc8c1621d49657057e9e4708a258f7252d9 @infininight infininight committed
Showing with 25 additions and 6 deletions.
  1. +25 −6 Syntaxes/CMake Listfile.tmLanguage
View
31 Syntaxes/CMake Listfile.tmLanguage
@@ -132,18 +132,37 @@
</dict>
<key>comments</key>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=#)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.cmake</string>
+ <string>punctuation.whitespace.comment.leading.cmake</string>
</dict>
</dict>
- <key>match</key>
- <string>(#).*$\n?</string>
- <key>name</key>
- <string>comment.line.number-sign.cmake</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>#</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.cmake</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.number-sign.cmake</string>
+ </dict>
+ </array>
</dict>
<key>constants</key>
<dict>

0 comments on commit 6760efc

Please sign in to comment.
Something went wrong with that request. Please try again.