Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 5ffff9c commit bb2ed8d916269fdcf033cc947caf44bfac22a5bb @infininight infininight committed Dec 11, 2011
Showing with 25 additions and 6 deletions.
  1. +25 −6 Syntaxes/Property List (Old-Style).tmLanguage
@@ -206,18 +206,37 @@
<string>comment.block.plist</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.plist</string>
+ <string>punctuation.whitespace.comment.leading.plist</string>
</dict>
</dict>
- <key>match</key>
- <string>(//).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.plist</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.plist</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-slash.plist</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit bb2ed8d

Please sign in to comment.