diff --git a/lib/haml/precompiler.rb b/lib/haml/precompiler.rb index a5405a9f..6aeeb347 100644 --- a/lib/haml/precompiler.rb +++ b/lib/haml/precompiler.rb @@ -109,8 +109,8 @@ END names.map do |name| # Can't use || because someone might explicitly pass in false with a symbol - sym_local = "_haml_locals[#{name.to_sym.inspect}]" - str_local = "_haml_locals[#{name.to_s.inspect}]" + sym_local = "_haml_locals[#{name.to_sym.inspect}]" + str_local = "_haml_locals[#{name.to_s.inspect}]" "#{name} = #{sym_local}.nil? ? #{str_local} : #{sym_local}" end.join(';') + ';' end @@ -719,7 +719,7 @@ END else open_tag << "\n" unless parse || nuke_inner_whitespace || (self_closing && nuke_outer_whitespace) end - + push_merged_text(open_tag, tag_closed || self_closing || nuke_inner_whitespace ? 0 : 1, !nuke_outer_whitespace) @@ -775,11 +775,11 @@ END raise SyntaxError.new('Illegal nesting: nesting within a tag that already has content is illegal.', @next_line.index) end - open = "" : "-->"}") + return push_text("#{open} #{line} #{conditional ? "" : "-->"}") end push_text(open, 1) diff --git a/test/haml/results/just_stuff.xhtml b/test/haml/results/just_stuff.xhtml index 4b36e5ba..cbd641fe 100644 --- a/test/haml/results/just_stuff.xhtml +++ b/test/haml/results/just_stuff.xhtml @@ -26,7 +26,7 @@ stuff followed by whitespace yee\ha

- - - testtest