Skip to content

Commit

Permalink
Support <!doctypehtml> in the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Oct 24, 2018
1 parent c3f5168 commit c6ecb90
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmarks/index.json
Expand Up @@ -3,7 +3,7 @@
"BBC": "https://www.bbc.co.uk/",
"Bootstrap CSS": "https://getbootstrap.com/docs/3.3/css/",
"Eloquent Javascript": "https://eloquentjavascript.net/1st_edition/print.html",
"ES6 draft": "https://tc39.github.io/ecma262/",
"ES draft": "https://tc39.github.io/ecma262/",
"ES6 table": "https://kangax.github.io/compat-table/es6/",
"Google": "https://www.google.com/",
"HTMLMinifier": "https://github.com/kangax/html-minifier",
Expand Down
2 changes: 1 addition & 1 deletion dist/htmlminifier.js
Expand Up @@ -24252,7 +24252,7 @@ var singleAttrIdentifier = /([^\s"'<>/=]+)/,
startTagOpen = new RegExp('^<' + qnameCapture),
startTagClose = /^\s*(\/?)>/,
endTag = new RegExp('^<\\/' + qnameCapture + '[^>]*>'),
doctype = /^<!DOCTYPE\s[^>]+>/i;
doctype = /^<!DOCTYPE\s?[^>]+>/i;

var IS_REGEX_CAPTURING_BROKEN = false;
'x'.replace(/x(.)?/g, function(m, g) {
Expand Down
2 changes: 1 addition & 1 deletion dist/htmlminifier.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/htmlparser.js
Expand Up @@ -60,7 +60,7 @@ var singleAttrIdentifier = /([^\s"'<>/=]+)/,
startTagOpen = new RegExp('^<' + qnameCapture),
startTagClose = /^\s*(\/?)>/,
endTag = new RegExp('^<\\/' + qnameCapture + '[^>]*>'),
doctype = /^<!DOCTYPE\s[^>]+>/i;
doctype = /^<!DOCTYPE\s?[^>]+>/i;

var IS_REGEX_CAPTURING_BROKEN = false;
'x'.replace(/x(.)?/g, function(m, g) {
Expand Down

0 comments on commit c6ecb90

Please sign in to comment.