Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHTML5 custom hyphenated attribute #807
Comments
added a commit
that referenced
this issue
Jul 14, 2018
stonean
closed this
Jul 14, 2018
added a commit
that referenced
this issue
Jul 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cuihq commentedApr 13, 2018
•
edited
Edited 16 times
-
cuihq
edited Apr 16, 2018 (most recent)
-
cuihq
edited Apr 16, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
-
cuihq
edited Apr 13, 2018
Issues:
slim code:
html expect:
html actual:
Reason:
The custom attributes are all
underscore.Do not need to switch between
underscoreanddasherize(camelize).So compatibility is better.
{object_id: 1} # not {'object-id' => 1} or {objectId: 1}Validate:
validate attribute
data-object_id:Code:
slim/lib/slim/splat/builder.rb
Line 94 in 5cc796c
modified code:
hyphen_attr("#{name}-#{n}", escape, v)Test:
Test code that needs to be changed:
slim/test/core/test_html_attributes.rb
Line 111 in 5cc796c