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)
330
330
if node . value [ :dynamic_attributes ] . old
331
331
parts << PlainPart . new ( "%div" ) if parts . empty?
332
332
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 )
340
336
else
341
- parts << PlainPart . new ( node . value [ :dynamic_attributes ] . old )
337
+ HashAttributesPart . new ( dynamic )
342
338
end
343
339
end
344
340
Original file line number Diff line number Diff line change @@ -121,17 +121,6 @@ def test_long_declaration_before_text
121
121
HAML
122
122
end
123
123
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
-
135
124
def test_quotes_in_strings
136
125
assert_format ( "%div{title: 'escape \" quotes'}" )
137
126
end
You can’t perform that action at this time.
0 commit comments