Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding javascript filter context so syntax highlighting partially works

  • Loading branch information...
commit 09e1e7a240a0f8e79ce349f7e255712fc25d0a7e 1 parent 51abee0
@sj26 authored
Showing with 48 additions and 1 deletion.
  1. +48 −1 Syntaxes/Ruby Haml.tmLanguage
View
49 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>
@@ -70,6 +70,53 @@
</dict>
<dict>
<key>begin</key>
+ <string>^( *)(:)(?i:javascript)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.filter.haml</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>meta.filter.haml</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>^(?!\1 )</string>
+ <key>name</key>
+ <string>source.js.embedded.haml</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.js</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>source.js.jquery</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>#{</string>
+ <key>end</key>
+ <string>}</string>
+ <key>name</key>
+ <string>source.ruby.rails.embedded.haml</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#interpolated_ruby</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
<string>^\s*(?:((%)([\w:]+))|(?=\.|#))</string>
<key>captures</key>
<dict>
Please sign in to comment.
Something went wrong with that request. Please try again.