Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit bb2b16efde912e1cdddfdf67b204d2f4dfc4c217 1 parent 32ee1e5
@kballard kballard authored
Showing with 24 additions and 9 deletions.
  1. +24 −9 Syntaxes/Haml.tmLanguage
View
33 Syntaxes/Haml.tmLanguage
@@ -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,6 +143,19 @@
</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>
@@ -152,7 +163,7 @@
<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>
Please sign in to comment.
Something went wrong with that request. Please try again.