mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Fix REFERENCE.md wording
This commit is contained in:
parent
57016e4222
commit
b3a615f10a
1 changed files with 2 additions and 2 deletions
|
@ -94,10 +94,10 @@ This design allows us to reduce work on runtime and is originally in [Faml](http
|
||||||
|
|
||||||
### Limited boolean attributes
|
### Limited boolean attributes
|
||||||
In Haml, `%a{ foo: false }` is rendered as `<a></a>`, whatever `foo` is.
|
In Haml, `%a{ foo: false }` is rendered as `<a></a>`, whatever `foo` is.
|
||||||
In Hamlit, this feature is supported for only boolean attributes, which is in
|
In Hamlit, this feature is supported for only boolean attributes, which are defined by
|
||||||
http://www.w3.org/TR/xhtml1/guidelines.html or https://html.spec.whatwg.org/.
|
http://www.w3.org/TR/xhtml1/guidelines.html or https://html.spec.whatwg.org/.
|
||||||
The list is the same as `ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES`.
|
The list is the same as `ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES`.
|
||||||
And `data-*` is also regarded as boolean.
|
In addition, `data-*` is also regarded as boolean.
|
||||||
|
|
||||||
Since foo is not boolean attribute, `%a{ foo: false }` is rendered as `<a foo='false'></a>` (`foo` is not removed).
|
Since foo is not boolean attribute, `%a{ foo: false }` is rendered as `<a foo='false'></a>` (`foo` is not removed).
|
||||||
This is the same behavior as Rails helpers.
|
This is the same behavior as Rails helpers.
|
||||||
|
|
Loading…
Add table
Reference in a new issue