Skip to content

Commit

Permalink
Optimise saveClones regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
mina86 committed Jul 30, 2016
1 parent f07f29d commit 9ffc7aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/html5shiv-printshiv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @preserve HTML5 Shiv 3.7.4-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
* @preserve HTML5 Shiv 3.7.4-pre | @afarkas @jdalton @jon_neal @rem @mina86 | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
Expand All @@ -13,7 +13,7 @@
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;

/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
var saveClones = /^(?:[abipq]|code|div|fieldset|h[1-6]|label|li|ol|span|strong|style|table|tbody|t[dhr]|ul)$/i;

/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
Expand Down
4 changes: 2 additions & 2 deletions src/html5shiv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @preserve HTML5 Shiv 3.7.4-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
* @preserve HTML5 Shiv 3.7.4-pre | @afarkas @jdalton @jon_neal @rem @mina86 | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
Expand All @@ -13,7 +13,7 @@
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;

/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
var saveClones = /^(?:[abipq]|code|div|fieldset|h[1-6]|label|li|ol|span|strong|style|table|tbody|t[dhr]|ul)$/i;

/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
Expand Down

0 comments on commit 9ffc7aa

Please sign in to comment.