validate-element-name
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -55,2 +55,6 @@ 'use strict'; | ||
if (/^[^a-z]/i.test(name)) { | ||
return 'This element name is only valid in XHTML, not in HTML. First character should be in the range a-z.'; | ||
} | ||
if (/-$/.test(name)) { | ||
@@ -60,3 +64,3 @@ return 'Custom element names should not end with an hyphen.'; | ||
if (/[^\x20-\x7E]+/.test(name)) { | ||
if (/[^\x20-\x7E]/.test(name)) { | ||
return 'Custom element names should not contain non-ASCII characters.'; | ||
@@ -63,0 +67,0 @@ } |
{ | ||
"name": "validate-element-name", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Validate the name of a custom element", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5162
98