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:
parent
bd5c0fb806
commit
ab88d002f9
2 changed files with 10 additions and 2 deletions
|
@ -42,8 +42,8 @@ module Hamlit
|
|||
token = tokens.first
|
||||
break unless token
|
||||
|
||||
pos = token.first.last
|
||||
str = str[(pos - 1)..-1]
|
||||
pos = token.first.last
|
||||
str = str[pos..-1]
|
||||
end
|
||||
|
||||
attributes
|
||||
|
|
|
@ -7,5 +7,13 @@ describe Hamlit::Engine do
|
|||
<p class='foo'>bar</p>
|
||||
HTML
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue