Permalink
Browse files

Improve comment.line matches.

  • Loading branch information...
1 parent 37c2a15 commit 46b29f62272808446248d91c08b302329e280dc6 @infininight infininight committed Nov 14, 2011
Showing with 53 additions and 19 deletions.
  1. +53 −19 Syntaxes/Gri.plist
View
@@ -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>
@@ -38,51 +38,85 @@
</dict>
<dict>
<key>begin</key>
- <string>#</string>
+ <string>(^[ \t]+)?(?=#)</string>
<key>beginCaptures</key>
<dict>
- <key>0</key>
+ <key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.gri</string>
+ <string>punctuation.whitespace.comment.leading.gri</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.number-sign.gri</string>
+ <string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>(?&gt;\\\s*\n)</string>
+ <key>begin</key>
+ <string>#</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.gri</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
<key>name</key>
- <string>punctuation.separator.continuation.gri</string>
+ <string>comment.line.number-sign.gri</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?&gt;\\\s*\n)</string>
+ <key>name</key>
+ <string>punctuation.separator.continuation.gri</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
- <string>//</string>
+ <string>(^[ \t]+)?(?=//)</string>
<key>beginCaptures</key>
<dict>
- <key>0</key>
+ <key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.gri</string>
+ <string>punctuation.whitespace.comment.leading.gri</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.gri</string>
+ <string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>(?&gt;\\\s*\n)</string>
+ <key>begin</key>
+ <string>//</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.gri</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
<key>name</key>
- <string>punctuation.separator.continuation.gri</string>
+ <string>comment.line.double-slash.gri</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?&gt;\\\s*\n)</string>
+ <key>name</key>
+ <string>punctuation.separator.continuation.gri</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit 46b29f6

Please sign in to comment.