提交 283133a5 编写于 作者: F Frankie Roberto

Adding itemscope to list of boolean attributes.

'itemscope' is defined within HTML5 for use in microdata markup. See
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.ht
ml#attr-itemscope
上级 4c1dcb05
......@@ -14,7 +14,7 @@ module TagHelper
BOOLEAN_ATTRIBUTES = %w(disabled readonly multiple checked autobuffer
autoplay controls loop selected hidden scoped async
defer reversed ismap seemless muted required
autofocus novalidate formnovalidate open pubdate).to_set
autofocus novalidate formnovalidate open pubdate itemscope).to_set
BOOLEAN_ATTRIBUTES.merge(BOOLEAN_ATTRIBUTES.map {|attribute| attribute.to_sym })
PRE_CONTENT_STRINGS = {
......
......@@ -30,8 +30,8 @@ def test_tag_options_accepts_blank_option
end
def test_tag_options_converts_boolean_option
assert_equal '<p disabled="disabled" multiple="multiple" readonly="readonly" />',
tag("p", :disabled => true, :multiple => true, :readonly => true)
assert_equal '<p disabled="disabled" itemscope="itemscope" multiple="multiple" readonly="readonly" />',
tag("p", :disabled => true, :itemscope => true, :multiple => true, :readonly => true)
end
def test_content_tag
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册