From bae250abd901a3094f085d338f0ea3e8c2792fb3 Mon Sep 17 00:00:00 2001 From: cn Date: Tue, 25 Oct 2011 18:58:15 +0200 Subject: [PATCH] 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. --- haml.jsf | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/haml.jsf b/haml.jsf index 96ee0c1..5740f02 100644 --- a/haml.jsf +++ b/haml.jsf @@ -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