# [./spec/render/attribute_spec.rb:48](../../../spec/render/attribute_spec.rb#L48)
## 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:61](../../../spec/render/attribute_spec.rb#L61)
## Input
```haml
%span.foo{class: "foo bar"}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:67](../../../spec/render/attribute_spec.rb#L67)
## Input
```haml
%span{class: []}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
## Input
```haml
- v = [1, nil, false, true]
%span{class: v}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
## Input
```haml
- h = { class: [1, nil, false, true] }
%span{h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:71](../../../spec/render/attribute_spec.rb#L71)
## Input
```haml
%span{class: [1, nil, false, true]}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:81](../../../spec/render/attribute_spec.rb#L81)
## Input
```haml
%span{id: []}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
## Input
```haml
- v = [1, nil, false, true]
%span{id: v}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
## Input
```haml
- h = { id: [1, nil, false, true] }
%span{h}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:85](../../../spec/render/attribute_spec.rb#L85)
## Input
```haml
%span{id: [1, nil, false, true]}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:91](../../../spec/render/attribute_spec.rb#L91)
## Input
```haml
%span{class: "x\"y'z"} hello
```
## Faml, Hamlit
```html
hello
```
## Haml
```html
hello
```
# [./spec/render/attribute_spec.rb:104](../../../spec/render/attribute_spec.rb#L104)
## 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:104](../../../spec/render/attribute_spec.rb#L104)
## 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:111](../../../spec/render/attribute_spec.rb#L111)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:115](../../../spec/render/attribute_spec.rb#L115)
## 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:129](../../../spec/render/attribute_spec.rb#L129)
## Input
```haml
- data = { foo: 1 }
%span{foo: {bar: "x#{1}y"}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:136](../../../spec/render/attribute_spec.rb#L136)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:159](../../../spec/render/attribute_spec.rb#L159)
## 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:167](../../../spec/render/attribute_spec.rb#L167)
## Input
```haml
%span{data: {foo: 1, bar: 2+3}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:171](../../../spec/render/attribute_spec.rb#L171)
## Input
```haml
- data = { foo: 1, bar: 2 }
%span{data: data} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:189](../../../spec/render/attribute_spec.rb#L189)
## Input
```haml
%span{b: __LINE__,
a: __LINE__}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:196](../../../spec/render/attribute_spec.rb#L196)
## Input
```haml
%span{"foo\0bar" => "hello"}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:196](../../../spec/render/attribute_spec.rb#L196)
## Input
```haml
- val = "hello"
%span{"foo\0bar" => val}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:196](../../../spec/render/attribute_spec.rb#L196)
## 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 << ("'>\...
... ^
```