Browse Source

Haml: not every = is the start of ruby code

If a line already contains plain characters (even whitespace, say everything
whitout a special function like tags etc) then an equal sign will only be
an equals sign not the start of ruby code.
pull/3/head
cn 9 years ago
parent
commit
bae250abd9
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      haml.jsf

+ 12
- 6
haml.jsf View File

@ -26,13 +26,19 @@
":" filter recolor=-1
:escape_first Constant
* idle
* idle_no_ruby
:idle Constant
* idle
* idle_no_ruby
"\n" line_start
"#" maybe_subst
"\\" maybe_subst_escape
"=~-" ruby_call noeat
"&!" maybe_esc_ruby_call
:idle_no_ruby Constant
* idle_no_ruby
"\n" line_start
"#" maybe_subst
"\\" maybe_subst_escape
@ -89,7 +95,7 @@
* line_start call=ruby.ruby(haml)
:maybe_esc_ruby_call Constant
* idle
* idle_no_ruby
"=" esc_ruby_call recolor=-2
:esc_ruby_call Idle
@ -100,15 +106,15 @@
* line_start call=ruby.ruby(haml)
:maybe_subst Constant
* idle
* idle_no_ruby
"{" subst recolor=-2
:subst Escape
* subst
"}" idle
"}" idle_no_ruby
:maybe_subst_escape Constant
* idle
* idle_no_ruby
:filter Filter
* idle

Loading…
Cancel
Save