# [./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, Haml
```html
```
## 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, Haml
```html
```
## 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:142](../../../spec/render/attribute_spec.rb#L142)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:165](../../../spec/render/attribute_spec.rb#L165)
## 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:173](../../../spec/render/attribute_spec.rb#L173)
## Input
```haml
%span{data: {foo: 1, bar: 2+3}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:177](../../../spec/render/attribute_spec.rb#L177)
## Input
```haml
- data = { foo: 1, bar: 2 }
%span{data: data} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:195](../../../spec/render/attribute_spec.rb#L195)
## Input
```haml
%span{b: __LINE__,
a: __LINE__}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
## Input
```haml
%span{"foo\0bar" => "hello"}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
## Input
```haml
- val = "hello"
%span{"foo\0bar" => val}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:202](../../../spec/render/attribute_spec.rb#L202)
## 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:216](../../../spec/render/attribute_spec.rb#L216)
## Input
```haml
%span[Faml::TestStruct.new(123)] hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestStruct.new(123)] hello
```
# [./spec/render/attribute_spec.rb:220](../../../spec/render/attribute_spec.rb#L220)
## 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:224](../../../spec/render/attribute_spec.rb#L224)
## Input
```haml
%span[Faml::TestRefStruct.new(123)] hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
[Faml::TestRefStruct.new(123)] hello
```
# [./spec/render/attribute_spec.rb:228](../../../spec/render/attribute_spec.rb#L228)
## 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:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
%span{foo: 1}(foo=2)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
%span(foo=2){foo: 1}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
- v = 2
%span{foo: v-1}(foo=v)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
- v = 2
%span(foo=v){foo: v-1}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
- h = {foo: 1}
%span{h}(foo=2)
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:234](../../../spec/render/attribute_spec.rb#L234)
## Input
```haml
- h = {foo: 1}
%span(foo=2){h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
## Input
```haml
%span{class: 1}(class=2)
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
## Input
```haml
- v = 2
%span{class: v-1}(class=v)
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:245](../../../spec/render/attribute_spec.rb#L245)
## Input
```haml
- h = {class: 1}
%span{h}(class=2)
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
%span{id: 1}(id=2)
```
## Faml
```html
```
## Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
%span(id=2){id: 1}
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
- v = 2
%span{id: v-1}(id=v)
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
- v = 2
%span(id=v){id: v-1}
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
- h = {id: 1}
%span{h}(id=2)
```
## Faml, Hamlit
```html
```
## Haml
```html
```
# [./spec/render/attribute_spec.rb:253](../../../spec/render/attribute_spec.rb#L253)
## Input
```haml
- h = {id: 1}
%span(id=2){h}
```
## Faml, Hamlit
```html
```
## Haml
```html
```