Skip to content

Latest commit

 

History

History
171 lines (124 loc) · 2.43 KB

attribute_spec.md

File metadata and controls

171 lines (124 loc) · 2.43 KB

Input

- h1 = { foo: 'should be overwritten' }
- h2 = { foo: nil }
%a{h1, h2}

Faml, Haml

<a></a>

Hamlit

<a foo=''></a>

Input

%span{foo: "x\"y'z"}hello

Faml, Hamlit

<span foo='x&quot;y&#39;z'>hello</span>

Haml

<span foo='x"y&#x0027;z'>hello</span>

Input

- v = "x\"y'z"
%span{foo: v}hello

Faml, Hamlit

<span foo='x&quot;y&#39;z'>hello</span>

Haml

<span foo='x"y&#x0027;z'>hello</span>

Input

- h = {foo: "x\"y'z"}
%span{h}hello

Faml, Hamlit

<span foo='x&quot;y&#39;z'>hello</span>

Haml

<span foo='x"y&#x0027;z'>hello</span>

Input (with options={:format=>:xhtml})

%span{foo: true}hello

Faml, Haml

<span foo='foo'>hello</span>

Hamlit

<span foo='true'>hello</span>

Input (with options={:format=>:xhtml})

- v = true
%span{foo: v}hello

Faml, Haml

<span foo='foo'>hello</span>

Hamlit

<span foo='true'>hello</span>

Input (with options={:format=>:xhtml})

- h = {foo: true}
%span{h}hello

Faml, Haml

<span foo='foo'>hello</span>

Hamlit

<span foo='true'>hello</span>

Input

- val = "hello"
%span{"foo\0bar" => val}

Faml, Haml

<span foo<0x00>bar='hello'></span>

Hamlit

<span foo\0bar='hello'></span>

Input

%span[Faml::TestRefStruct.new(123)] hello

Faml, Haml

<span class='faml_test' id='faml_test_123'>hello</span>

Hamlit

<span class='faml_test_ref_struct' id='faml_test_ref_struct_123'>hello</span>