Permalink
Browse files

Support the | continuation syntax

git-svn-id: http://svn.textmate.org/trunk/Bundles/Haml.tmbundle@6464 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 32ee1e5 commit bb2b16efde912e1cdddfdf67b204d2f4dfc4c217 @kballard kballard committed Jan 19, 2007
Showing with 24 additions and 9 deletions.
  1. +24 −9 Syntaxes/Haml.tmLanguage
View
@@ -95,9 +95,9 @@
</dict>
<dict>
<key>begin</key>
- <string>\{</string>
+ <string>\{(?=.*\}|.*\|\s*$)</string>
<key>end</key>
- <string>\}</string>
+ <string>\}|$|^(?!.*\|\s*$)</string>
<key>name</key>
<string>meta.section.attributes.haml</string>
<key>patterns</key>
@@ -106,6 +106,10 @@
<key>include</key>
<string>source.ruby.rails</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#continuation</string>
+ </dict>
</array>
</dict>
<dict>
@@ -121,12 +125,6 @@
</array>
</dict>
<dict>
- <key>match</key>
- <string>\|$</string>
- <key>name</key>
- <string>punctuation.terminator.line.continuation.haml</string>
- </dict>
- <dict>
<key>captures</key>
<dict>
<key>1</key>
@@ -145,14 +143,27 @@
</array>
<key>repository</key>
<dict>
+ <key>continuation</key>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.continuation.haml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(\|)\s*\n</string>
+ </dict>
<key>rubyline</key>
<dict>
<key>begin</key>
<string>=|-|~</string>
<key>contentName</key>
<string>source.ruby.embedded.haml</string>
<key>end</key>
- <string>((do|\{)( \|[^|]+\|)?)$|$</string>
+ <string>((do|\{)( \|[^|]+\|)?)$|$|^(?!.*\|\s*$)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
@@ -174,6 +185,10 @@
<key>include</key>
<string>source.ruby.rails</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#continuation</string>
+ </dict>
</array>
</dict>
</dict>

0 comments on commit bb2b16e

Please sign in to comment.