Sha256: 3533ede277f3b3b26cc78f9e73c6d996ad72ebacc7abbc0f268bdda6067fc933

Contents?: true

Size: 1.79 KB

Versions: 5

Compression:

Stored size: 1.79 KB

Contents

# [old\_attributes\_spec.rb:43](/spec/hamlit/engine/old_attributes_spec.rb#L43)
## Input
```haml
%span{ class: '}}}', id: '{}}' } }{

```

## Output
### Faml
```html
Faml::Compiler::UnparsableRubyCode: Unparsable Ruby code is given to attributes:  class: '
```

### Hamlit
```html
<span class='}}}' id='{}}'>}{</span>

```


# [old\_attributes\_spec.rb:124](/spec/hamlit/engine/old_attributes_spec.rb#L124)
## Input
```haml
.foo{ class: ['bar'] }
.foo{ class: ['bar', 'foo'] }
.foo{ class: ['bar', nil] }
.foo{ class: ['bar', 'baz'] }

```

## Output
### Faml
```html
<div class='bar foo'></div>
<div class='bar foo'></div>
<div class=' bar foo'></div>
<div class='bar baz foo'></div>

```

### Hamlit
```html
<div class='bar foo'></div>
<div class='bar foo'></div>
<div class='bar foo'></div>
<div class='bar baz foo'></div>

```


# [old\_attributes\_spec.rb:203](/spec/hamlit/engine/old_attributes_spec.rb#L203)
## Input
```haml
/ wontfix: Non-boolean attributes are not escaped for optimization.
- val = false
%a{ href: val }
- val = nil
%a{ href: val }

/ Boolean attributes are escaped correctly.
- val = false
%a{ disabled: val }
- val = nil
%a{ disabled: val }

```

## Output
### Faml
```html
<!-- wontfix: Non-boolean attributes are not escaped for optimization. -->
<a></a>
<a></a>
<!-- Boolean attributes are escaped correctly. -->
<a></a>
<a></a>

```

### Hamlit
```html
<!-- wontfix: Non-boolean attributes are not escaped for optimization. -->
<a href='false'></a>
<a href=''></a>
<!-- Boolean attributes are escaped correctly. -->
<a></a>
<a></a>

```


# [old\_attributes\_spec.rb:275](/spec/hamlit/engine/old_attributes_spec.rb#L275)
## Input
```haml
%span{ data: { disable: true } } bar

```

## Output
### Faml
```html
<span data-disable='true'>bar</span>

```

### Hamlit
```html
<span data-disable>bar</span>

```

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hamlit-1.7.1 doc/faml/engine/old_attributes.md
hamlit-1.7.0 doc/faml/engine/old_attributes.md
hamlit-1.6.7 doc/faml/engine/old_attributes.md
hamlit-1.6.6 doc/faml/engine/old_attributes.md
hamlit-1.6.5 doc/faml/engine/old_attributes.md