Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent e5fad42 commit 1f4489248fbc27c67f0a037e73373c00f03a3677 @infininight infininight committed Nov 13, 2011
Showing with 50 additions and 16 deletions.
  1. +50 −16 Syntaxes/Fortran - Modern.tmLanguage
@@ -202,47 +202,81 @@
</dict>
<dict>
<key>begin</key>
- <string>(!-)</string>
+ <string>(^[ \t]+)?(?=!-)</string>
<key>beginCaptures</key>
<dict>
- <key>0</key>
+ <key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.fortran</string>
+ <string>punctuation.whitespace.comment.leading.ruby</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.exclamation.mark.fortran.modern</string>
+ <string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>\\\s*\n</string>
+ <key>begin</key>
+ <string>!-</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.fortran</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.exclamation.mark.fortran.modern</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\\\s*\n</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
- <string>[!]</string>
+ <string>(^[ \t]+)?(?=!)</string>
<key>beginCaptures</key>
<dict>
- <key>0</key>
+ <key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.fortran</string>
+ <string>punctuation.whitespace.comment.leading.ruby</string>
</dict>
</dict>
<key>end</key>
- <string>$\n?</string>
- <key>name</key>
- <string>comment.line.exclamation.fortran.modern</string>
+ <string>(?!\G)</string>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>\\\s*\n</string>
+ <key>begin</key>
+ <string>!</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.fortran</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.exclamation.fortran.modern</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\\\s*\n</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit 1f44892

Please sign in to comment.