# [./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:71](../../../spec/render/attribute_spec.rb#L71)
## Input
```haml
%span{class: "x\"y'z"} hello
```
## Faml, Hamlit
```html
hello
```
## Haml
```html
hello
```
# [./spec/render/attribute_spec.rb:84](../../../spec/render/attribute_spec.rb#L84)
## 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:84](../../../spec/render/attribute_spec.rb#L84)
## 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:91](../../../spec/render/attribute_spec.rb#L91)
## Input
```haml
%span{foo: {bar: 1+2}} hello
```
## Faml
```html
hello
```
## Haml, Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:95](../../../spec/render/attribute_spec.rb#L95)
## 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:109](../../../spec/render/attribute_spec.rb#L109)
## Input
```haml
- data = { foo: 1 }
%span{foo: {bar: "x#{1}y"}} hello
```
## Faml
```html
hello
```
## Haml, 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:138](../../../spec/render/attribute_spec.rb#L138)
## 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:146](../../../spec/render/attribute_spec.rb#L146)
## Input
```haml
%span{data: {foo: 1, bar: 2+3}} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:150](../../../spec/render/attribute_spec.rb#L150)
## Input
```haml
- data = { foo: 1, bar: 2 }
%span{data: data} hello
```
## Faml, Haml
```html
hello
```
## Hamlit
```html
hello
```
# [./spec/render/attribute_spec.rb:158](../../../spec/render/attribute_spec.rb#L158)
## Input
```haml
%span{b: __LINE__,
a: __LINE__}
```
## Faml, Haml
```html
```
## Hamlit
```html
```
# [./spec/render/attribute_spec.rb:165](../../../spec/render/attribute_spec.rb#L165)
## Input
```haml
%span{"foo\0bar" => "hello"}
```
## Faml, Haml
```html