Better <html> regex for minified html strings

This commit is contained in:
Chip Lay 2015-06-10 10:06:43 -04:00
parent 82ef236cb1
commit f5842d609e
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ HtmlWebpackPlugin.prototype.injectAssetsIntoHtml = function(html, templateParams
});
// Inject manifest into the opening html tag
if (assets.manifest) {
html = html.replace(/(<html.*)(>)/i, function (match, start, end) {
html = html.replace(/(<html[^>]*)(>)/i, function (match, start, end) {
// Append the manifest only if no manifest was specified
if (/\smanifest\s*=/.test(match)) {
return match;