Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 45fc60c commit 60be009fc8d44a3c9c0d5c13888ee674769776ac @infininight infininight committed Nov 14, 2011
Showing with 22 additions and 5 deletions.
  1. +22 −5 Syntaxes/Erlang.plist
View
27 Syntaxes/Erlang.plist
@@ -231,19 +231,36 @@
<key>comment</key>
<dict>
<key>begin</key>
- <string>(%)</string>
+ <string>(^[ \t]+)?(?=%)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.erlang</string>
+ <string>punctuation.whitespace.comment.leading.erlang</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.erlang</string>
+ <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.erlang</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.percentage.erlang</string>
+ </dict>
+ </array>
</dict>
<key>define-directive</key>
<dict>

0 comments on commit 60be009

Please sign in to comment.