From 59fa14846a03ae5d98631662168e069548b1e488 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 28 Nov 2015 19:44:45 +0900 Subject: [PATCH] Fix wording in reference --- REFERENCE.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index d026ecde..419455c2 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -79,18 +79,17 @@ On production environemnt, :ugly mode is used and Hamlit currently supports only So you'll see difference rendering result on development environment, but it'll be the same on production. ### No Haml buffer -Hamlit uses Array as buffer for performance. So you can't touch Haml::Buffer from template when using Hamlit. +Hamlit uses `Array` as buffer for performance. So you can't touch Haml::Buffer from template when using Hamlit. ### Haml helpers are still in development -At the same time, because some methods in Haml::Buffer requires Haml::Buffer, they are not supported now. +At the same time, because some methods in `Haml::Helpers` require `Haml::Buffer`, they are not supported now. But some helpers are supported on Rails. Some of not-implemented methods are planned to be supported. ### Limited attributes hyphenation In Haml, `%a{ foo: { bar: 'baz' } }` is rendered as ``, whatever foo is. In Hamlit, this feature is supported only for data attribute. Hamlit renders `%a{ data: { foo: 'bar' } }` -as `` because it's data attribute. - -This design allows us to reduce work on runtime and is originally in [Faml](https://github.com/eagletmt/faml). +as `` because it's data attribute. This design allows us to reduce work on runtime +and the idea is originally in [Faml](https://github.com/eagletmt/faml). ### Limited boolean attributes In Haml, `%a{ foo: false }` is rendered as ``, whatever `foo` is. @@ -99,13 +98,11 @@ 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`. In addition, data-\* is also regarded as boolean. -Since foo is not boolean attribute, `%a{ foo: false }` is rendered as `` (`foo` is not removed). -This is the same behavior as Rails helpers. - -Also for `%a{ foo: nil }`, Hamlit does not remove non-boolean attributes and render ``. -This design allows us to reduce String concatenation. - -This is the largest difference between Hamlit and Faml. +Since `foo` is not boolean attribute, `%a{ foo: false }` is rendered as `` +This is the same behavior as Rails helpers. Also for `%a{ foo: nil }`, +Hamlit does not remove non-boolean attributes and render `` +(`foo` is not removed). This design allows us to reduce string concatenation and +is the only difference between Faml and Hamlit. ## 5 Types of Attributes