# [./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
%span{class: [1, nil, false, true]}
```
## 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: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
%span{id: [1, nil, false, true]}
```
## 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: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:109](../../../spec/render/attribute_spec.rb#L109)
## 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:109](../../../spec/render/attribute_spec.rb#L109)
## 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:116](../../../spec/render/attribute_spec.rb#L116)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:120](../../../spec/render/attribute_spec.rb#L120)
## 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:134](../../../spec/render/attribute_spec.rb#L134)
## Input
```haml
- data = { foo: 1 }
%span{foo: {bar: "x#{1}y"}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:141](../../../spec/render/attribute_spec.rb#L141)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:164](../../../spec/render/attribute_spec.rb#L164)
## 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:172](../../../spec/render/attribute_spec.rb#L172)
## Input
```haml
%span{data: {foo: 1, bar: 2+3}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:176](../../../spec/render/attribute_spec.rb#L176)
## Input
```haml
- data = { foo: 1, bar: 2 }
%span{data: data} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:194](../../../spec/render/attribute_spec.rb#L194)
## Input
```haml
%span{b: __LINE__,
a: __LINE__}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
## Input
```haml
%span{"foo\0bar" => "hello"}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
## Input
```haml
- val = "hello"
%span{"foo\0bar" => val}
```
## Faml, Haml
```html
bar='hello'>
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:201](../../../spec/render/attribute_spec.rb#L201)
## 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 << ("'>\...
... ^
```