Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve comment.line matches.

  • Loading branch information...
commit 8838462e4543a43e740cb85bc96bc58ebc48e164 1 parent f4098bf
@infininight infininight authored
Showing with 50 additions and 12 deletions.
  1. +50 −12 Syntaxes/DOT.plist
View
62 Syntaxes/DOT.plist
@@ -111,32 +111,70 @@
</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.dot</string>
+ <string>punctuation.whitespace.comment.leading.dot</string>
</dict>
</dict>
- <key>match</key>
- <string>(//).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.dot</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.dot</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-slash.dot</string>
+ </dict>
+ </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.dot</string>
+ <string>punctuation.whitespace.comment.leading.dot</string>
</dict>
</dict>
- <key>match</key>
- <string>(#).*$\n?</string>
- <key>name</key>
- <string>comment.line.number-sign.dot</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.dot</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.number-sign.dot</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>begin</key>
Please sign in to comment.
Something went wrong with that request. Please try again.