1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Fix fatal mistake in new attribute compiler

This commit is contained in:
Takashi Kokubun 2015-03-27 21:55:41 +09:00
parent bd5c0fb806
commit ab88d002f9
2 changed files with 10 additions and 2 deletions

View file

@ -42,8 +42,8 @@ module Hamlit
token = tokens.first token = tokens.first
break unless token break unless token
pos = token.first.last pos = token.first.last
str = str[(pos - 1)..-1] str = str[pos..-1]
end end
attributes attributes

View file

@ -7,5 +7,13 @@ describe Hamlit::Engine do
<p class='foo'>bar</p> <p class='foo'>bar</p>
HTML HTML
end end
it 'renders multiple attributes' do
assert_render(<<-HAML, <<-HTML)
%p(a=1 b=2) bar
HAML
<p a='1' b='2'>bar</p>
HTML
end
end end
end end