Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for ruby string lines (^==), patch from Marten Veldthuis.

git-svn-id: http://svn.textmate.org/trunk/Bundles/Ruby Haml.tmbundle@10255 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit 874426346c9e1cafd6823bdd8b6e5100485088b9 1 parent fdb062e
@infininight infininight authored
Showing with 156 additions and 1 deletion.
  1. +156 −1 Syntaxes/Ruby Haml.tmLanguage
View
157 Syntaxes/Ruby Haml.tmLanguage
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
@@ -18,6 +18,21 @@
<key>patterns</key>
<array>
<dict>
+ <key>begin</key>
+ <string>^\s*==</string>
+ <key>contentName</key>
+ <string>string.quoted.double.ruby</string>
+ <key>end</key>
+ <string>$\n?</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#interpolated_ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
<key>captures</key>
<dict>
<key>1</key>
@@ -94,6 +109,21 @@
<key>patterns</key>
<array>
<dict>
+ <key>begin</key>
+ <string>==</string>
+ <key>contentName</key>
+ <string>string.quoted.double.ruby</string>
+ <key>end</key>
+ <string>$\n?</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#interpolated_ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
<key>match</key>
<string>\.[\w-]+</string>
<key>name</key>
@@ -196,6 +226,131 @@
<key>match</key>
<string>(\|)\s*\n</string>
</dict>
+ <key>interpolated_ruby</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.embedded.ruby</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>source.ruby.embedded.source.empty</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>#\{(\})</string>
+ <key>name</key>
+ <string>source.ruby.embedded.source</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>#\{</string>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.embedded.ruby</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(\})</string>
+ <key>name</key>
+ <string>source.ruby.embedded.source</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#nest_curly_and_self</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>source.ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.variable.ruby</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(#@)[a-zA-Z_]\w*</string>
+ <key>name</key>
+ <string>variable.other.readwrite.instance.ruby</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.variable.ruby</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(#@@)[a-zA-Z_]\w*</string>
+ <key>name</key>
+ <string>variable.other.readwrite.class.ruby</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.variable.ruby</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(#\$)[a-zA-Z_]\w*</string>
+ <key>name</key>
+ <string>variable.other.readwrite.global.ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <key>nest_curly_and_self</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\{</string>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.scope.ruby</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\}</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#nest_curly_and_self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>source.ruby</string>
+ </dict>
+ </array>
+ </dict>
<key>rubyline</key>
<dict>
<key>begin</key>
Please sign in to comment.
Something went wrong with that request. Please try again.