Skip to content
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 2c0f2d0 commit e3874566a2681fba4078606430cd4de6e20bd90d @infininight infininight committed Nov 21, 2011
Showing with 26 additions and 9 deletions.
  1. +26 −9 Syntaxes/PmWiki.tmLanguage
View
35 Syntaxes/PmWiki.tmLanguage
@@ -43,26 +43,43 @@
</dict>
<dict>
<key>begin</key>
- <string>%comment%</string>
+ <string>(^[ \t]+)?(?=%comment%)</string>
<key>beginCaptures</key>
<dict>
- <key>0</key>
+ <key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.pmwiki</string>
+ <string>punctuation.whitespace.comment.leading.pmwiki</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.pmwiki</string>
+ <string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>(?&gt;\\\s*\n)</string>
+ <key>begin</key>
+ <string>%comment%</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.pmwiki</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
<key>name</key>
- <string>punctuation.separator.continuation.pmwiki</string>
+ <string>comment.line.pmwiki</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(?&gt;\\\s*\n)</string>
+ <key>name</key>
+ <string>punctuation.separator.continuation.pmwiki</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit e387456

Please sign in to comment.
Something went wrong with that request. Please try again.