Fix a buffer-tabulation bug involving <.

This commit is contained in:
Nathan Weizenbaum 2008-06-11 12:40:52 -07:00
parent fcca7e0987
commit 7c13afdeb7
3 changed files with 13 additions and 1 deletions

View File

@ -114,7 +114,7 @@ module Haml
result = html_escape(result) if escape_html
has_newline = result.include?("\n")
if in_tag && (@options[:ugly] || !has_newline || preserve_tag)
if in_tag && !nuke_inner_whitespace && (@options[:ugly] || !has_newline || preserve_tag)
@buffer << result
@real_tabs -= 1
return

View File

@ -32,3 +32,9 @@
Bar
</div></q>
</p>
<p>
<q>foo</q>
<q a='2'>
bar
</q>
</p>

View File

@ -24,3 +24,9 @@
%div
Foo
Bar
-# Regression test
%p
%q<= "foo"
%q{:a => 1 + 1}
bar