Closed bronson closed 11 years ago
Here's a quick snippet to test these. Just drop the following in a .haml file:
"data" #{"code"}
! "data" #{"<code>"}
- "code"
= "code"
~ "code\ncode"
!= "code"
&= "code"
%p "data" #{"code"}
%p! "data" #{"<code>"}
%p= "code"
%p~ "code\ncode"
%p!= "code"
%p&= "code"
/ comment
-# comment
=# comment
!=# comment
&=# comment
The words code, data, and comment should all be highlighted properly. Github syntax highlighting gets it right!
Thanks Scott. I tried getting in touch with Sublime people regarding the Rails package but got no response.
Haml syntax supports !=, &= and ! to change escaping for string interpolation: http://haml.info/docs/yardoc/file.REFERENCE.html#escaping_html
Problem is, this syntax file doesn't understand this and highlights the Ruby code as plain text. Ugly!
This set of patches fixes it. Submitted in separate patches so, despite the complexity of the regexes, the intent is perfectly clear.
Submitted to you because, alas, Sublime's Rails support is being neglected and now looks truly antique. I really hope your changes make it upstream!