Skip to content

Commit 3cf15c9

Browse files
committed
Update to smaller regex to allow for '-' and ':' in tags, update printshiv as well.
1 parent ab6d1e9 commit 3cf15c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/html5shiv-printshiv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
'var n=f.cloneNode(),c=n.createElement;' +
188188
'h.shivMethods&&(' +
189189
// unroll the `createElement` calls
190-
getElements().join().replace(/\w+/g, function(nodeName) {
190+
getElements().join().replace(/[\w\-\w\:]+/g, function(nodeName) {
191191
data.createElem(nodeName);
192192
data.frag.createElement(nodeName);
193193
return 'c("' + nodeName + '")';

src/html5shiv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
'var n=f.cloneNode(),c=n.createElement;' +
188188
'h.shivMethods&&(' +
189189
// unroll the `createElement` calls
190-
getElements().join().replace(/([\w\-]|[\w\:])+/g, function(nodeName) {
190+
getElements().join().replace(/[\w\-\w\:]+/g, function(nodeName) {
191191
data.createElem(nodeName);
192192
data.frag.createElement(nodeName);
193193
return 'c("' + nodeName + '")';

0 commit comments

Comments
 (0)