Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 989 Bytes

hash_attribute_spec.md

File metadata and controls

64 lines (45 loc) · 989 Bytes

Input

%span{foo: {bar: 1+2}} hello

Faml, Hamlit

<span foo='{:bar=&gt;3}'>hello</span>

Haml

<span foo-bar='3'>hello</span>

Input

- attrs = { foo: 1, bar: { hoge: :fuga }, baz: true }
%span{attrs} hello

Faml

<span bar='{:hoge=&gt;:fuga}' baz foo='1'>hello</span>

Haml

<span bar-hoge='fuga' baz foo='1'>hello</span>

Hamlit

<span bar='{:hoge=&gt;:fuga}' baz='true' foo='1'>hello</span>

Input

- data = { foo: 1 }
%span{foo: {bar: "x#{1}y"}} hello

Faml, Hamlit

<span foo='{:bar=&gt;&quot;x1y&quot;}'>hello</span>

Haml

<span foo-bar='x1y'>hello</span>