这个 HAML(带有链式助手):
- haml_tag :a, helper_method_1(local1, local2).merge( helper_method_2 local3, local4 ) do
%div{ style: helper_method_3(local5, local6) }
%span= local7
%h3{style: "color: black"}= local8
正在生成这个(倒置的)HTML:
<div style="prop1: val:1; prop2: val2;"></div>
<span>Span Text</span>
<h3 style="prop3: val3;">H3 Text</h3>
<a class="class-value" id="id-value" href="href-value"></a>
但是如果我们删除链式方法,比如:
(...)
- haml_tag :a, helper_method_1(local1, local2) do
(...)
比 HTML 按预期呈现:
<a class="class-value" id="id-value" href="href-value">
<div style="prop1: val:1; prop2: val2;"></div>
<span>Span Text</span>
<h3 style="prop3: val3;">H3 Text</h3>
</a>
HAML 有什么问题?