Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve comment.line match.

  • Loading branch information...
commit 5da9d953980280d7d81f3e21742529e4241a5fde 1 parent 16721d2
@infininight infininight authored
Showing with 25 additions and 6 deletions.
  1. +25 −6 Syntaxes/Prolog.tmLanguage
View
31 Syntaxes/Prolog.tmLanguage
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.