Don't lstrip ESCAPEd text

fixes regression caused 92c33a222f
This commit is contained in:
Akira Matsuda 2014-07-09 14:25:52 +09:00
parent 9a4a53b48d
commit 43835eeaf6
3 changed files with 5 additions and 1 deletions

View File

@ -244,7 +244,9 @@ module Haml
return push flat_script(line.strip!(2), false) if line.text[1] == FLAT_SCRIPT
return push plain(line.strip!(1), false) if line.text[1] == ?\s
push plain(line)
when ESCAPE; push plain(line.strip!(1))
when ESCAPE
line.text = line.text[1..-1]
push plain(line)
else; push plain(line)
end
end

View File

@ -24,6 +24,7 @@ stuff followed by whitespace
- character
%p foo
yee\ha
don't lstrip me
</p>
<!-- Short comment -->
<!--

View File

@ -29,6 +29,7 @@
\- character
\%p foo
\yee\ha
\ don't lstrip me
/ Short comment
/
This is a block comment