Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 16721d2 commit 5da9d953980280d7d81f3e21742529e4241a5fde @infininight infininight committed Nov 21, 2011
Showing with 25 additions and 6 deletions.
  1. +25 −6 Syntaxes/Prolog.tmLanguage
View
@@ -66,18 +66,37 @@
<string>comment.block.prolog</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.prolog</string>
+ <string>punctuation.whitespace.comment.leading.prolog</string>
</dict>
</dict>
- <key>match</key>
- <string>(%).*$\n?</string>
- <key>name</key>
- <string>comment.line.percentage.prolog</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.prolog</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.percentage.prolog</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>match</key>

0 comments on commit 5da9d95

Please sign in to comment.