Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 3cf33f5 commit 4a8974840b97753d4d4f67f4db789bcf592c4d91 @infininight infininight committed with sorbits Nov 13, 2011
Showing with 26 additions and 9 deletions.
  1. +26 −9 Syntaxes/Objective-C.tmLanguage
@@ -750,26 +750,43 @@
</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.objc</string>
+ <string>punctuation.whitespace.comment.leading.objc</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.c++</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.objc</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
<key>name</key>
- <string>punctuation.separator.continuation.c++</string>
+ <string>comment.line.double-slash.objc</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?&gt;\\\s*\n)</string>
+ <key>name</key>
+ <string>punctuation.separator.continuation.objc</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit 4a89748

Please sign in to comment.