File tree Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -330,15 +330,11 @@ def visit_tag(node)
330330 if node . value [ :dynamic_attributes ] . old
331331 parts << PlainPart . new ( "%div" ) if parts . empty?
332332
333- if ::Haml ::AttributeParser . available?
334- dynamic = parse_attributes ( node . value [ :dynamic_attributes ] . old )
335- parts << if dynamic . is_a? ( LiteralHashValue )
336- PlainPart . new ( dynamic . value )
337- else
338- HashAttributesPart . new ( dynamic )
339- end
333+ dynamic = parse_attributes ( node . value [ :dynamic_attributes ] . old )
334+ parts << if dynamic . is_a? ( LiteralHashValue )
335+ PlainPart . new ( dynamic . value )
340336 else
341- parts << PlainPart . new ( node . value [ :dynamic_attributes ] . old )
337+ HashAttributesPart . new ( dynamic )
342338 end
343339 end
344340
Original file line number Diff line number Diff line change @@ -121,17 +121,6 @@ def test_long_declaration_before_text
121121 HAML
122122 end
123123
124- def test_long_declaration_before_text_without_parser
125- long = "a" * 80
126-
127- ::Haml ::AttributeParser . stub ( :available? , false ) do
128- assert_format ( "%button{ data: { current: #{ long } } } foo" , <<~HAML )
129- %button{ data: { current: #{ long } } }
130- foo
131- HAML
132- end
133- end
134-
135124 def test_quotes_in_strings
136125 assert_format ( "%div{title: 'escape \" quotes'}" )
137126 end
You can’t perform that action at this time.
0 commit comments