# [./spec/render/attribute_spec.rb:49](../../../spec/render/attribute_spec.rb#L49)
## Input
```haml
- h1 = {class: 'c1', id: ['id1', 'id3']}
- h2 = {class: [{}, 'c2'], id: 'id2'}
%span#main.content{h1, h2} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:62](../../../spec/render/attribute_spec.rb#L62)
## Input
```haml
%span.foo{class: "foo bar"}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:68](../../../spec/render/attribute_spec.rb#L68)
## Input
```haml
%span{class: []}
```
## Faml
```html
```
## Haml, Hamlit
```html
```
# [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
## Input
```haml
%span{class: [1, nil, false, true]}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
## Input
```haml
- v = [1, nil, false, true]
%span{class: v}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:72](../../../spec/render/attribute_spec.rb#L72)
## Input
```haml
- h = { class: [1, nil, false, true] }
%span{h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:82](../../../spec/render/attribute_spec.rb#L82)
## Input
```haml
%span{id: []}
```
## Faml
```html
```
## Haml, Hamlit
```html
```
# [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
## Input
```haml
%span{id: [1, nil, false, true]}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
## Input
```haml
- v = [1, nil, false, true]
%span{id: v}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:86](../../../spec/render/attribute_spec.rb#L86)
## Input
```haml
- h = { id: [1, nil, false, true] }
%span{h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:92](../../../spec/render/attribute_spec.rb#L92)
## Input
```haml
%span{class: "x\"y'z"} hello
```
## Faml, Hamlit
```html
hello
```
## Haml
```html
hello
```
# [./spec/render/attribute_spec.rb:110](../../../spec/render/attribute_spec.rb#L110)
## Input (with options={:format=>:xhtml})
```haml
- foo = true
%span{foo: foo, bar: 1} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:110](../../../spec/render/attribute_spec.rb#L110)
## Input (with options={:format=>:xhtml})
```haml
- h = {foo: true, bar: 1}
%span{h} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:117](../../../spec/render/attribute_spec.rb#L117)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:121](../../../spec/render/attribute_spec.rb#L121)
## Input
```haml
- attrs = { foo: 1, bar: { hoge: :fuga }, baz: true }
%span{attrs} hello
```
## Faml
```html
hello
```
## Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:135](../../../spec/render/attribute_spec.rb#L135)
## Input
```haml
- data = { foo: 1 }
%span{foo: {bar: "x#{1}y"}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:149](../../../spec/render/attribute_spec.rb#L149)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:172](../../../spec/render/attribute_spec.rb#L172)
## Input
```haml
%span{data: {foo: 1, bar: 'baz', :hoge => :fuga, k1: { k2: 'v3' }}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:180](../../../spec/render/attribute_spec.rb#L180)
## Input
```haml
%span{data: {foo: 1, bar: 2+3}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:184](../../../spec/render/attribute_spec.rb#L184)
## Input
```haml
- data = { foo: 1, bar: 2 }
%span{data: data} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
## Input
```haml
%span{b: __LINE__,
a: __LINE__}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:209](../../../spec/render/attribute_spec.rb#L209)
## Input
```haml
%span{"foo\0bar" => "hello"}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:209](../../../spec/render/attribute_spec.rb#L209)
## Input
```haml
- val = "hello"
%span{"foo\0bar" => val}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:209](../../../spec/render/attribute_spec.rb#L209)
## Input
```haml
- key = "foo\0bar"
- val = "hello"
%span{key => val}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit (Error)
```html
(eval):3: syntax error, unexpected =>
...::Temple::Utils.escape_html((=> val))); _buf << ("'>\...
... ^
```
# [./spec/render/attribute_spec.rb:223](../../../spec/render/attribute_spec.rb#L223)
## Input
```haml
%span[Faml::TestStruct.new(123)] hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestStruct.new(123)] hello
```
# [./spec/render/attribute_spec.rb:227](../../../spec/render/attribute_spec.rb#L227)
## Input
```haml
%span[Faml::TestStruct.new(123), :hello] hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestStruct.new(123), :hello] hello
```
# [./spec/render/attribute_spec.rb:231](../../../spec/render/attribute_spec.rb#L231)
## Input
```haml
%span[Faml::TestRefStruct.new(123)] hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestRefStruct.new(123)] hello
```
# [./spec/render/attribute_spec.rb:235](../../../spec/render/attribute_spec.rb#L235)
## Input
```haml
%span#baz[Faml::TestStruct.new(123)]{id: "foo"} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestStruct.new(123)]{id: "foo"} hello
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
%span{foo: 1}(foo=2)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
%span(foo=2){foo: 1}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
- v = 2
%span{foo: v-1}(foo=v)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
- v = 2
%span(foo=v){foo: v-1}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
- h = {foo: 1}
%span{h}(foo=2)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:241](../../../spec/render/attribute_spec.rb#L241)
## Input
```haml
- h = {foo: 1}
%span(foo=2){h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:260](../../../spec/render/attribute_spec.rb#L260)
## Input
```haml
%span{id: 1}(id=2)
```
## Faml, Haml
```html
```
## Hamlit
```html
```