Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve comment.line match.

  • Loading branch information...
commit 8ff10dd165614d33a28328475ec0a0f1a54dabf2 1 parent 61a959c
@infininight infininight authored
Showing with 51 additions and 13 deletions.
  1. +51 −13 Syntaxes/qmake Project.tmLanguage
View
64 Syntaxes/qmake Project.tmLanguage
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
@@ -233,18 +233,37 @@
</array>
</dict>
<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.qmake</string>
+ <string>punctuation.whitespace.comment.leading.qmake</string>
</dict>
</dict>
- <key>match</key>
- <string>(#).*$\n?</string>
- <key>name</key>
- <string>comment.line.number-sign.qmake</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.qmake</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.number-sign.qmake</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
@@ -286,18 +305,37 @@
<string>keyword.other.scope.qmake</string>
</dict>
<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.qmake</string>
+ <string>punctuation.whitespace.comment.leading.qmake</string>
</dict>
</dict>
- <key>match</key>
- <string>(#).*$\n?</string>
- <key>name</key>
- <string>comment.line.number-sign.qmake</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.qmake</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.number-sign.qmake</string>
+ </dict>
+ </array>
</dict>
</array>
<key>scopeName</key>

0 comments on commit 8ff10dd

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