feat(html): switch to htmlparser2 (#5127)
- switch to [`htmlparser2`](https://github.com/fb55/htmlparser2) - no need to fork - won't generate pseudo nodes ([`parse5` will](https://github.com/prettier/prettier/issues/5098#issuecomment-423055181)) - should be [faster](https://github.com/fb55/htmlparser2#performance) - support custom self-closing tags - support HTML entities - remove extra trailing newline for `<template>` - distinguish empty/empty-string attributes (`<tag x>`/`<tag x="">`) - rename `--parser parse5` with `--parser html` - enable `html` since 1.15, which means it's enabled by default if you install the dev version from GitHub after this PR merged.master
parent
0cbacd3156
commit
13147facc5
|
@ -25,6 +25,7 @@
|
||||||
"dashify": "0.2.2",
|
"dashify": "0.2.2",
|
||||||
"dedent": "0.7.0",
|
"dedent": "0.7.0",
|
||||||
"diff": "3.2.0",
|
"diff": "3.2.0",
|
||||||
|
"domhandler": "2.4.2",
|
||||||
"editorconfig": "0.15.0",
|
"editorconfig": "0.15.0",
|
||||||
"editorconfig-to-prettier": "0.0.6",
|
"editorconfig-to-prettier": "0.0.6",
|
||||||
"emoji-regex": "6.5.1",
|
"emoji-regex": "6.5.1",
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
"globby": "6.1.0",
|
"globby": "6.1.0",
|
||||||
"graphql": "0.13.2",
|
"graphql": "0.13.2",
|
||||||
"html-tag-names": "1.1.2",
|
"html-tag-names": "1.1.2",
|
||||||
|
"htmlparser2": "3.9.2",
|
||||||
"ignore": "3.3.7",
|
"ignore": "3.3.7",
|
||||||
"jest-docblock": "23.2.0",
|
"jest-docblock": "23.2.0",
|
||||||
"json-stable-stringify": "1.0.1",
|
"json-stable-stringify": "1.0.1",
|
||||||
|
@ -47,7 +49,6 @@
|
||||||
"minimatch": "3.0.4",
|
"minimatch": "3.0.4",
|
||||||
"minimist": "1.2.0",
|
"minimist": "1.2.0",
|
||||||
"normalize-path": "3.0.0",
|
"normalize-path": "3.0.0",
|
||||||
"parse5": "5.0.0",
|
|
||||||
"parse5-htmlparser2-tree-adapter": "5.0.0",
|
"parse5-htmlparser2-tree-adapter": "5.0.0",
|
||||||
"postcss-less": "1.1.5",
|
"postcss-less": "1.1.5",
|
||||||
"postcss-media-query-parser": "0.2.3",
|
"postcss-media-query-parser": "0.2.3",
|
||||||
|
|
|
@ -68,7 +68,7 @@ const parsers = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: "src/language-html/parser-parse5.js",
|
input: "src/language-html/parser-html.js",
|
||||||
target: "universal"
|
target: "universal"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export class EventEmitter {}
|
|
@ -109,8 +109,8 @@ module.exports = [
|
||||||
require("../language-html"),
|
require("../language-html"),
|
||||||
{
|
{
|
||||||
parsers: {
|
parsers: {
|
||||||
get parse5() {
|
get html() {
|
||||||
return eval("require")("../language-html/parser-parse5").parsers.parse5;
|
return eval("require")("../language-html/parser-html").parsers.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
module.exports = function(ast, newNode) {
|
module.exports = function(ast, newNode) {
|
||||||
delete newNode.sourceCodeLocation;
|
delete newNode.startIndex;
|
||||||
|
delete newNode.endIndex;
|
||||||
|
delete newNode.attribs;
|
||||||
|
|
||||||
if (ast.type === "text") {
|
if (ast.type === "text") {
|
||||||
return null;
|
return null;
|
||||||
|
@ -11,4 +13,12 @@ module.exports = function(ast, newNode) {
|
||||||
if (ast.type === "yaml") {
|
if (ast.type === "yaml") {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ast.type === "attribute") {
|
||||||
|
delete newNode.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ast.type === "directive" && ast.name === "!doctype") {
|
||||||
|
delete newNode.data;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@ function embed(path, print, textToDoc, options) {
|
||||||
parent.attribs.type === "application/javascript")
|
parent.attribs.type === "application/javascript")
|
||||||
) {
|
) {
|
||||||
const parser = options.parser === "flow" ? "flow" : "babylon";
|
const parser = options.parser === "flow" ? "flow" : "babylon";
|
||||||
const doc = textToDoc(getText(options, node), { parser });
|
const doc = textToDoc(node.data, { parser });
|
||||||
return concat([hardline, doc]);
|
return concat([hardline, doc]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,17 +30,13 @@ function embed(path, print, textToDoc, options) {
|
||||||
(parent.attribs.type === "application/x-typescript" ||
|
(parent.attribs.type === "application/x-typescript" ||
|
||||||
parent.attribs.lang === "ts")
|
parent.attribs.lang === "ts")
|
||||||
) {
|
) {
|
||||||
const doc = textToDoc(
|
const doc = textToDoc(node.data, { parser: "typescript" }, options);
|
||||||
getText(options, node),
|
|
||||||
{ parser: "typescript" },
|
|
||||||
options
|
|
||||||
);
|
|
||||||
return concat([hardline, doc]);
|
return concat([hardline, doc]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inline Styles
|
// Inline Styles
|
||||||
if (parent.type === "style") {
|
if (parent.type === "style") {
|
||||||
const doc = textToDoc(getText(options, node), { parser: "css" });
|
const doc = textToDoc(node.data, { parser: "css" });
|
||||||
return concat([hardline, doc]);
|
return concat([hardline, doc]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,11 +102,4 @@ function replaceNewlinesWithLiterallines(doc) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getText(options, node) {
|
|
||||||
return options.originalText.slice(
|
|
||||||
options.locStart(node),
|
|
||||||
options.locEnd(node)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = embed;
|
module.exports = embed;
|
||||||
|
|
|
@ -6,8 +6,8 @@ const createLanguage = require("../utils/create-language");
|
||||||
const languages = [
|
const languages = [
|
||||||
createLanguage(require("linguist-languages/data/html"), {
|
createLanguage(require("linguist-languages/data/html"), {
|
||||||
override: {
|
override: {
|
||||||
since: null, // unreleased
|
since: "1.15.0",
|
||||||
parsers: ["parse5"],
|
parsers: ["html"],
|
||||||
vscodeLanguageIds: ["html"]
|
vscodeLanguageIds: ["html"]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const parseFrontMatter = require("../utils/front-matter");
|
||||||
|
const { HTML_TAGS } = require("./utils");
|
||||||
|
|
||||||
|
function parse(text /*, parsers, opts*/) {
|
||||||
|
const { frontMatter, content } = parseFrontMatter(text);
|
||||||
|
|
||||||
|
// Inline the require to avoid loading all the JS if we don't use it
|
||||||
|
const Parser = require("htmlparser2/lib/Parser");
|
||||||
|
const DomHandler = require("domhandler");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* modifications:
|
||||||
|
* - empty attributes (e.g., `<tag attr>`) are parsed as `{ [attr]: null }` instead of `{ [attr]: "" }`
|
||||||
|
* - trigger `Handler#onselfclosingtag()`
|
||||||
|
*/
|
||||||
|
class CustomParser extends Parser {
|
||||||
|
constructor(cbs, options) {
|
||||||
|
super(cbs, options);
|
||||||
|
this._attribvalue = null;
|
||||||
|
}
|
||||||
|
onattribdata(value) {
|
||||||
|
if (this._attribvalue === null) {
|
||||||
|
this._attribvalue = "";
|
||||||
|
}
|
||||||
|
super.onattribdata(value);
|
||||||
|
}
|
||||||
|
onattribend() {
|
||||||
|
super.onattribend();
|
||||||
|
this._attribvalue = null;
|
||||||
|
}
|
||||||
|
onselfclosingtag() {
|
||||||
|
if (this._options.xmlMode || this._options.recognizeSelfClosing) {
|
||||||
|
const name = this._tagname;
|
||||||
|
this.onopentagend();
|
||||||
|
if (this._stack[this._stack.length - 1] === name) {
|
||||||
|
this._cbs.onselfclosingtag();
|
||||||
|
this._cbs.onclosetag(name);
|
||||||
|
this._stack.pop();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onopentagend();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* modifications:
|
||||||
|
* - add `selfClosing` field
|
||||||
|
*/
|
||||||
|
class CustomDomHandler extends DomHandler {
|
||||||
|
onselfclosingtag() {
|
||||||
|
this._tagStack[this._tagStack.length - 1].selfClosing = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handler = new CustomDomHandler({
|
||||||
|
withStartIndices: true,
|
||||||
|
withEndIndices: true
|
||||||
|
});
|
||||||
|
|
||||||
|
new CustomParser(handler, {
|
||||||
|
lowerCaseTags: true, // preserve lowercase tag names to avoid false check in htmlparser2 and apply the lowercasing later
|
||||||
|
lowerCaseAttributeNames: false,
|
||||||
|
recognizeSelfClosing: true
|
||||||
|
}).end(content);
|
||||||
|
|
||||||
|
const ast = normalize({ type: "root", children: handler.dom }, text);
|
||||||
|
|
||||||
|
if (frontMatter) {
|
||||||
|
ast.children.unshift(frontMatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ast;
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize(node, text) {
|
||||||
|
delete node.parent;
|
||||||
|
delete node.next;
|
||||||
|
delete node.prev;
|
||||||
|
|
||||||
|
let isCaseSensitiveTag = false;
|
||||||
|
|
||||||
|
if (node.type === "tag" && !(node.name in HTML_TAGS)) {
|
||||||
|
isCaseSensitiveTag = true;
|
||||||
|
node.name = text.slice(
|
||||||
|
node.startIndex + 1, // <
|
||||||
|
node.startIndex + 1 + node.name.length
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.attribs) {
|
||||||
|
node.attributes = Object.keys(node.attribs).map(attributeKey => ({
|
||||||
|
type: "attribute",
|
||||||
|
key: isCaseSensitiveTag ? attributeKey : attributeKey.toLowerCase(),
|
||||||
|
value: node.attribs[attributeKey]
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.children) {
|
||||||
|
node.children = node.children.map(child => normalize(child, text));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
node.type === "tag" &&
|
||||||
|
node.name === "textarea" &&
|
||||||
|
node.children.length === 1 &&
|
||||||
|
node.children[0].type === "text" &&
|
||||||
|
node.children[0].data === "\n" &&
|
||||||
|
!/<\/textarea>$/.test(text.slice(locStart(node), locEnd(node)))
|
||||||
|
) {
|
||||||
|
node.children = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
function locStart(node) {
|
||||||
|
return node.startIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
function locEnd(node) {
|
||||||
|
return node.endIndex + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
parsers: {
|
||||||
|
html: {
|
||||||
|
parse,
|
||||||
|
astFormat: "htmlparser2",
|
||||||
|
locStart,
|
||||||
|
locEnd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,89 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const htmlTagNames = require("html-tag-names");
|
|
||||||
const parseFrontMatter = require("../utils/front-matter");
|
|
||||||
|
|
||||||
const nonFragmentRegex = /^\s*(<!--[\s\S]*?-->\s*)*<(!doctype|html|head|body)[\s>]/i;
|
|
||||||
|
|
||||||
function parse(text /*, parsers, opts*/) {
|
|
||||||
// Inline the require to avoid loading all the JS if we don't use it
|
|
||||||
const parse5 = require("parse5");
|
|
||||||
const htmlparser2TreeAdapter = require("parse5-htmlparser2-tree-adapter");
|
|
||||||
|
|
||||||
const { frontMatter, content } = parseFrontMatter(text);
|
|
||||||
|
|
||||||
const isFragment = !nonFragmentRegex.test(content);
|
|
||||||
const ast = (isFragment ? parse5.parseFragment : parse5.parse)(content, {
|
|
||||||
treeAdapter: htmlparser2TreeAdapter,
|
|
||||||
sourceCodeLocationInfo: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const normalizedAst = normalize(ast, text);
|
|
||||||
|
|
||||||
if (frontMatter) {
|
|
||||||
normalizedAst.children.unshift(frontMatter);
|
|
||||||
}
|
|
||||||
|
|
||||||
return normalizedAst;
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalize(node, text) {
|
|
||||||
delete node.parent;
|
|
||||||
delete node.next;
|
|
||||||
delete node.prev;
|
|
||||||
|
|
||||||
let isCaseSensitiveTag = false;
|
|
||||||
|
|
||||||
// preserve case-sensitive tag names
|
|
||||||
if (
|
|
||||||
node.type === "tag" &&
|
|
||||||
node.sourceCodeLocation &&
|
|
||||||
htmlTagNames.indexOf(node.name) === -1
|
|
||||||
) {
|
|
||||||
isCaseSensitiveTag = true;
|
|
||||||
node.name = text.slice(
|
|
||||||
node.sourceCodeLocation.startOffset + 1, // <
|
|
||||||
node.sourceCodeLocation.startOffset + 1 + node.name.length
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node.attribs) {
|
|
||||||
node.attributes = Object.keys(node.attribs).map(attributeKey => {
|
|
||||||
const sourceCodeLocation = node.sourceCodeLocation.attrs[attributeKey];
|
|
||||||
return {
|
|
||||||
type: "attribute",
|
|
||||||
key: isCaseSensitiveTag
|
|
||||||
? text
|
|
||||||
.slice(
|
|
||||||
sourceCodeLocation.startOffset,
|
|
||||||
sourceCodeLocation.endOffset
|
|
||||||
)
|
|
||||||
.split("=", 1)[0]
|
|
||||||
: attributeKey,
|
|
||||||
value: node.attribs[attributeKey],
|
|
||||||
sourceCodeLocation
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node.children) {
|
|
||||||
node.children = node.children.map(child => normalize(child, text));
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
parsers: {
|
|
||||||
parse5: {
|
|
||||||
parse,
|
|
||||||
astFormat: "htmlparser2",
|
|
||||||
locStart(node) {
|
|
||||||
return node.sourceCodeLocation && node.sourceCodeLocation.startOffset;
|
|
||||||
},
|
|
||||||
locEnd(node) {
|
|
||||||
return node.sourceCodeLocation && node.sourceCodeLocation.endOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
|
@ -18,12 +18,11 @@ const {
|
||||||
utils: { willBreak, isLineNext, isEmpty }
|
utils: { willBreak, isLineNext, isEmpty }
|
||||||
} = require("../doc");
|
} = require("../doc");
|
||||||
const {
|
const {
|
||||||
|
VOID_TAGS,
|
||||||
hasPrettierIgnore,
|
hasPrettierIgnore,
|
||||||
isBooleanAttributeNode,
|
|
||||||
isPreTagNode,
|
isPreTagNode,
|
||||||
isScriptTagNode,
|
isScriptTagNode,
|
||||||
isTextAreaTagNode,
|
isTextAreaTagNode,
|
||||||
isVoidTagNode,
|
|
||||||
isWhitespaceOnlyText
|
isWhitespaceOnlyText
|
||||||
} = require("./utils");
|
} = require("./utils");
|
||||||
|
|
||||||
|
@ -37,7 +36,15 @@ function genericPrint(path, options, print) {
|
||||||
case "directive": {
|
case "directive": {
|
||||||
return concat([
|
return concat([
|
||||||
"<",
|
"<",
|
||||||
n.data.replace('!DOCTYPE html ""', "!DOCTYPE html"),
|
n.name === "!doctype"
|
||||||
|
? n.data
|
||||||
|
.replace(/\s+/g, " ")
|
||||||
|
.replace(
|
||||||
|
/^(!doctype)(( html)?)/i,
|
||||||
|
(_, doctype, doctypeHtml) =>
|
||||||
|
doctype.toUpperCase() + doctypeHtml.toLowerCase()
|
||||||
|
)
|
||||||
|
: n.data,
|
||||||
">",
|
">",
|
||||||
hardline
|
hardline
|
||||||
]);
|
]);
|
||||||
|
@ -46,7 +53,9 @@ function genericPrint(path, options, print) {
|
||||||
const parentNode = path.getParentNode();
|
const parentNode = path.getParentNode();
|
||||||
|
|
||||||
if (isPreTagNode(parentNode) || isTextAreaTagNode(parentNode)) {
|
if (isPreTagNode(parentNode) || isTextAreaTagNode(parentNode)) {
|
||||||
return n.data;
|
return concat(
|
||||||
|
n.data.split(/(\n)/g).map((x, i) => (i % 2 === 1 ? hardline : x))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return n.data.replace(/\s+/g, " ").trim();
|
return n.data.replace(/\s+/g, " ").trim();
|
||||||
|
@ -54,11 +63,11 @@ function genericPrint(path, options, print) {
|
||||||
case "script":
|
case "script":
|
||||||
case "style":
|
case "style":
|
||||||
case "tag": {
|
case "tag": {
|
||||||
const isVoid = isVoidTagNode(n);
|
const isVoid = n.name in VOID_TAGS;
|
||||||
const openingPrinted = printOpeningTag(path, print, isVoid);
|
const openingPrinted = printOpeningTag(path, print, isVoid);
|
||||||
|
|
||||||
// Print self closing tag
|
// Print self closing tag
|
||||||
if (isVoid) {
|
if (isVoid || n.selfClosing) {
|
||||||
return openingPrinted;
|
return openingPrinted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,24 +80,9 @@ function genericPrint(path, options, print) {
|
||||||
|
|
||||||
const children = printChildren(path, print, options);
|
const children = printChildren(path, print, options);
|
||||||
|
|
||||||
// NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move
|
|
||||||
// on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
|
|
||||||
if (isPreTagNode(n) || isTextAreaTagNode(n)) {
|
if (isPreTagNode(n) || isTextAreaTagNode(n)) {
|
||||||
const originalTagContent = options.originalText.slice(
|
|
||||||
n.sourceCodeLocation.startTag.endOffset,
|
|
||||||
n.sourceCodeLocation.endTag.startOffset
|
|
||||||
);
|
|
||||||
const hasNewlineAfterTag = /^(\r\n|\r|\n)/.test(originalTagContent);
|
|
||||||
|
|
||||||
return dedentToRoot(
|
return dedentToRoot(
|
||||||
group(
|
group(concat([openingPrinted, concat(children), closingPrinted]))
|
||||||
concat([
|
|
||||||
openingPrinted,
|
|
||||||
hasNewlineAfterTag ? hardline : "",
|
|
||||||
concat(children),
|
|
||||||
closingPrinted
|
|
||||||
])
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,18 +151,8 @@ function genericPrint(path, options, print) {
|
||||||
return concat(["<!--", n.data, "-->"]);
|
return concat(["<!--", n.data, "-->"]);
|
||||||
}
|
}
|
||||||
case "attribute": {
|
case "attribute": {
|
||||||
if (!n.value) {
|
if (n.value === null) {
|
||||||
if (isBooleanAttributeNode(n)) {
|
return n.key;
|
||||||
return n.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
const originalAttributeSourceCode = options.originalText.slice(
|
|
||||||
n.sourceCodeLocation.startOffset,
|
|
||||||
n.sourceCodeLocation.endOffset
|
|
||||||
);
|
|
||||||
const hasEqualSign = originalAttributeSourceCode.indexOf("=") !== -1;
|
|
||||||
|
|
||||||
return hasEqualSign ? concat([n.key, '=""']) : n.key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return concat([n.key, '="', n.value.replace(/"/g, """), '"']);
|
return concat([n.key, '="', n.value.replace(/"/g, """), '"']);
|
||||||
|
@ -186,15 +170,23 @@ function genericPrint(path, options, print) {
|
||||||
function printOpeningTag(path, print, isVoid) {
|
function printOpeningTag(path, print, isVoid) {
|
||||||
const n = path.getValue();
|
const n = path.getValue();
|
||||||
|
|
||||||
|
const selfClosing = isVoid || n.selfClosing;
|
||||||
|
|
||||||
// Don't break self-closing elements with no attributes
|
// Don't break self-closing elements with no attributes
|
||||||
if (isVoid && !n.attributes.length) {
|
if (selfClosing && !n.attributes.length) {
|
||||||
return concat(["<", n.name, " />"]);
|
return concat(["<", n.name, " />"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't break up opening elements with a single long text attribute
|
// Don't break up opening elements with a single long text attribute
|
||||||
if (n.attributes && n.attributes.length === 1 && n.attributes[0].value) {
|
if (n.attributes && n.attributes.length === 1 && n.attributes[0].value) {
|
||||||
return group(
|
return group(
|
||||||
concat(["<", n.name, " ", concat(path.map(print, "attributes")), ">"])
|
concat([
|
||||||
|
"<",
|
||||||
|
n.name,
|
||||||
|
" ",
|
||||||
|
concat(path.map(print, "attributes")),
|
||||||
|
selfClosing ? " />" : ">"
|
||||||
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +197,7 @@ function printOpeningTag(path, print, isVoid) {
|
||||||
indent(
|
indent(
|
||||||
concat(path.map(attr => concat([line, print(attr)]), "attributes"))
|
concat(path.map(attr => concat([line, print(attr)]), "attributes"))
|
||||||
),
|
),
|
||||||
isVoid ? concat([line, "/>"]) : concat([softline, ">"])
|
selfClosing ? concat([line, "/>"]) : concat([softline, ">"])
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +1,50 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/indices.html#attributes-3
|
const htmlTagNames = require("html-tag-names");
|
||||||
const BOOLEAN_ATTRIBUTES = [
|
|
||||||
"allowfullscreen",
|
|
||||||
"allowpaymentrequest",
|
|
||||||
"async",
|
|
||||||
"autofocus",
|
|
||||||
"autoplay",
|
|
||||||
"checked",
|
|
||||||
"controls",
|
|
||||||
"default",
|
|
||||||
"defer",
|
|
||||||
"disabled",
|
|
||||||
"formnovalidate",
|
|
||||||
"hidden",
|
|
||||||
"ismap",
|
|
||||||
"itemscope",
|
|
||||||
"loop",
|
|
||||||
"multiple",
|
|
||||||
"muted",
|
|
||||||
"nomodule",
|
|
||||||
"novalidate",
|
|
||||||
"open",
|
|
||||||
"readonly",
|
|
||||||
"required",
|
|
||||||
"reversed",
|
|
||||||
"selected",
|
|
||||||
"typemustmatch"
|
|
||||||
];
|
|
||||||
|
|
||||||
// http://w3c.github.io/html/single-page.html#void-elements
|
const HTML_TAGS = arrayToMap(htmlTagNames);
|
||||||
const VOID_TAGS = [
|
|
||||||
|
// NOTE: must be same as the one in htmlparser2 so that the parsing won't be inconsistent
|
||||||
|
// https://github.com/fb55/htmlparser2/blob/v3.9.2/lib/Parser.js#L59-L91
|
||||||
|
const VOID_TAGS = arrayToMap([
|
||||||
"area",
|
"area",
|
||||||
"base",
|
"base",
|
||||||
|
"basefont",
|
||||||
"br",
|
"br",
|
||||||
"col",
|
"col",
|
||||||
|
"command",
|
||||||
"embed",
|
"embed",
|
||||||
|
"frame",
|
||||||
"hr",
|
"hr",
|
||||||
"img",
|
"img",
|
||||||
"input",
|
"input",
|
||||||
|
"isindex",
|
||||||
|
"keygen",
|
||||||
"link",
|
"link",
|
||||||
"meta",
|
"meta",
|
||||||
"param",
|
"param",
|
||||||
"source",
|
"source",
|
||||||
"track",
|
"track",
|
||||||
"wbr"
|
"wbr",
|
||||||
];
|
|
||||||
|
"path",
|
||||||
|
"circle",
|
||||||
|
"ellipse",
|
||||||
|
"line",
|
||||||
|
"rect",
|
||||||
|
"use",
|
||||||
|
"stop",
|
||||||
|
"polyline",
|
||||||
|
"polygon"
|
||||||
|
]);
|
||||||
|
|
||||||
|
function arrayToMap(array) {
|
||||||
|
const map = Object.create(null);
|
||||||
|
for (const value of array) {
|
||||||
|
map[value] = true;
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
function hasPrettierIgnore(path) {
|
function hasPrettierIgnore(path) {
|
||||||
const node = path.getValue();
|
const node = path.getValue();
|
||||||
|
@ -88,16 +87,6 @@ function isWhitespaceOnlyText(node) {
|
||||||
return node.type === "text" && node.data.trim().length === 0;
|
return node.type === "text" && node.data.trim().length === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isBooleanAttributeNode(node) {
|
|
||||||
return (
|
|
||||||
node.type === "attribute" && BOOLEAN_ATTRIBUTES.indexOf(node.key) !== -1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isVoidTagNode(node) {
|
|
||||||
return node.type === "tag" && VOID_TAGS.indexOf(node.name) !== -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isPreTagNode(node) {
|
function isPreTagNode(node) {
|
||||||
return node.type === "tag" && node.name === "pre";
|
return node.type === "tag" && node.name === "pre";
|
||||||
}
|
}
|
||||||
|
@ -111,11 +100,11 @@ function isScriptTagNode(node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
HTML_TAGS,
|
||||||
|
VOID_TAGS,
|
||||||
hasPrettierIgnore,
|
hasPrettierIgnore,
|
||||||
isBooleanAttributeNode,
|
|
||||||
isWhitespaceOnlyText,
|
|
||||||
isPreTagNode,
|
isPreTagNode,
|
||||||
isScriptTagNode,
|
isScriptTagNode,
|
||||||
isTextAreaTagNode,
|
isTextAreaTagNode,
|
||||||
isVoidTagNode
|
isWhitespaceOnlyText
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,7 +122,7 @@ const options = {
|
||||||
since: null,
|
since: null,
|
||||||
description: "Handlebars"
|
description: "Handlebars"
|
||||||
},
|
},
|
||||||
{ value: "parse5", since: null, description: "HTML" }
|
{ value: "html", since: "1.15.0", description: "HTML" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`attributes.html - parse5-verify 1`] = `
|
exports[`attributes.html - html-verify 1`] = `
|
||||||
<input name=address maxlength=200>
|
<input name=address maxlength=200>
|
||||||
<input name='address' maxlength='200'>
|
<input name='address' maxlength='200'>
|
||||||
<input name="address" maxlength="200">
|
<input name="address" maxlength="200">
|
||||||
|
@ -131,7 +131,7 @@ and HTML5 Apps. It also documents Mozilla products, like Firefox OS."
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`boolean.html - parse5-verify 1`] = `
|
exports[`boolean.html - html-verify 1`] = `
|
||||||
<button type="submit">This is valid.</button>
|
<button type="submit">This is valid.</button>
|
||||||
<button type="submit" disabled>This is valid.</button>
|
<button type="submit" disabled>This is valid.</button>
|
||||||
<button type="submit" disabled="">This is valid.</button>
|
<button type="submit" disabled="">This is valid.</button>
|
||||||
|
@ -154,7 +154,7 @@ exports[`boolean.html - parse5-verify 1`] = `
|
||||||
<button type="submit" disabled>
|
<button type="submit" disabled>
|
||||||
This is valid.
|
This is valid.
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" disabled>
|
<button type="submit" disabled="">
|
||||||
This is valid.
|
This is valid.
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" disabled="disabled">
|
<button type="submit" disabled="disabled">
|
||||||
|
@ -189,26 +189,26 @@ exports[`boolean.html - parse5-verify 1`] = `
|
||||||
</button>
|
</button>
|
||||||
<input type="checkbox" checked disabled name="cheese" />
|
<input type="checkbox" checked disabled name="cheese" />
|
||||||
<input type="checkbox" checked="checked" disabled="disabled" name="cheese" />
|
<input type="checkbox" checked="checked" disabled="disabled" name="cheese" />
|
||||||
<input type="checkbox" checked disabled name="cheese" />
|
<input type="checkbox" checked="" disabled="" name="cheese" />
|
||||||
<div lang=""></div>
|
<div lang=""></div>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`dobule-quotes.html - parse5-verify 1`] = `
|
exports[`dobule-quotes.html - html-verify 1`] = `
|
||||||
<img src="test.png" alt="John 'ShotGun' Nelson">
|
<img src="test.png" alt="John 'ShotGun' Nelson">
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<img src="test.png" alt="John 'ShotGun' Nelson" />
|
<img src="test.png" alt="John 'ShotGun' Nelson" />
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`single-quotes.html - parse5-verify 1`] = `
|
exports[`single-quotes.html - html-verify 1`] = `
|
||||||
<img src="test.png" alt='John "ShotGun" Nelson'>
|
<img src="test.png" alt='John "ShotGun" Nelson'>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<img src="test.png" alt="John "ShotGun" Nelson" />
|
<img src="test.png" alt="John "ShotGun" Nelson" />
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`without-quotes.html - parse5-verify 1`] = `
|
exports[`without-quotes.html - html-verify 1`] = `
|
||||||
<p title=Title>String</p>
|
<p title=Title>String</p>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<p title="Title">String</p>
|
<p title="Title">String</p>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`basic.html - parse5-verify 1`] = `
|
exports[`basic.html - html-verify 1`] = `
|
||||||
<template>
|
<template>
|
||||||
<i class.bind="icon"></i>
|
<i class.bind="icon"></i>
|
||||||
</template>
|
</template>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<template>
|
<template>
|
||||||
<i class.bind="icon"></i>
|
<i class.bind="icon"></i>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`comment.html - parse5-verify 1`] = `
|
exports[`comment.html - html-verify 1`] = `
|
||||||
<!--hello world-->
|
<!--hello world-->
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<!--hello world-->
|
<!--hello world-->
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`empty.html - parse5-verify 1`] = `
|
exports[`empty.html - html-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`empty-doc.html - parse5-verify 1`] = `
|
exports[`empty-doc.html - html-verify 1`] = `
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
|
@ -27,7 +27,7 @@ exports[`empty-doc.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`form.html - parse5-verify 1`] = `
|
exports[`form.html - html-verify 1`] = `
|
||||||
<form>
|
<form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="exampleInputEmail1">Email address</label>
|
<label for="exampleInputEmail1">Email address</label>
|
||||||
|
@ -168,7 +168,7 @@ exports[`form.html - parse5-verify 1`] = `
|
||||||
value="option1"
|
value="option1"
|
||||||
checked
|
checked
|
||||||
/>
|
/>
|
||||||
Option one is this and that—be sure to include why it's great
|
Option one is this and that—be sure to include why it's great
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
@ -210,7 +210,7 @@ exports[`form.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`hello-world.html - parse5-verify 1`] = `
|
exports[`hello-world.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -229,7 +229,7 @@ exports[`hello-world.html - parse5-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
<title>Document</title>
|
<title>Document</title>
|
||||||
|
@ -242,7 +242,7 @@ exports[`hello-world.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html-comments.html - parse5-verify 1`] = `
|
exports[`html-comments.html - html-verify 1`] = `
|
||||||
<!-- htmlhint attr-lowercase: false -->
|
<!-- htmlhint attr-lowercase: false -->
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
@ -253,7 +253,6 @@ exports[`html-comments.html - parse5-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<!-- htmlhint attr-lowercase: false -->
|
<!-- htmlhint attr-lowercase: false -->
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
|
||||||
<body>
|
<body>
|
||||||
<a href="#">Anchor</a>
|
<a href="#">Anchor</a>
|
||||||
<div hidden class="foo" id="bar"></div>
|
<div hidden class="foo" id="bar"></div>
|
||||||
|
@ -262,7 +261,7 @@ exports[`html-comments.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html-fragment.html - parse5-verify 1`] = `
|
exports[`html-fragment.html - html-verify 1`] = `
|
||||||
<a href="#">Link</a>
|
<a href="#">Link</a>
|
||||||
|
|
||||||
<textarea>
|
<textarea>
|
||||||
|
@ -273,7 +272,7 @@ exports[`html-fragment.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html5-boilerplate.html - parse5-verify 1`] = `
|
exports[`html5-boilerplate.html - html-verify 1`] = `
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="no-js" lang="">
|
<html class="no-js" lang="">
|
||||||
|
|
||||||
|
@ -318,7 +317,7 @@ exports[`html5-boilerplate.html - parse5-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js" lang="">
|
<html class="no-js" lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||||
<title></title>
|
<title></title>
|
||||||
<meta name="description" content="" />
|
<meta name="description" content="" />
|
||||||
|
@ -375,7 +374,7 @@ exports[`html5-boilerplate.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`more-html.html - parse5-verify 1`] = `
|
exports[`more-html.html - html-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -394,7 +393,7 @@ exports[`more-html.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`void-elements.html - parse5-verify 1`] = `
|
exports[`void-elements.html - html-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
@ -405,7 +404,7 @@ exports[`void-elements.html - parse5-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" href="code-guide.css" />
|
<link rel="stylesheet" href="code-guide.css" />
|
||||||
</head>
|
</head>
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`case.html - parse5-verify 1`] = `
|
exports[`case.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<HTML CLASS="no-js mY-ClAsS">
|
<HTML CLASS="no-js mY-ClAsS">
|
||||||
<HEAD>
|
<HEAD>
|
||||||
|
@ -21,7 +21,7 @@ exports[`case.html - parse5-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js mY-ClAsS">
|
<html class="no-js mY-ClAsS">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>My tITlE</title>
|
<title>My tITlE</title>
|
||||||
<meta name="description" content="My CoNtEnT" />
|
<meta name="description" content="My CoNtEnT" />
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`conditional.html - parse5-verify 1`] = `
|
exports[`conditional.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
@ -16,7 +16,6 @@ exports[`conditional.html - parse5-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
|
||||||
<body>
|
<body>
|
||||||
<!--[if IE 5]>This is IE 5<br><![endif]-->
|
<!--[if IE 5]>This is IE 5<br><![endif]-->
|
||||||
<!--[if IE 6]>This is IE 6<br><![endif]-->
|
<!--[if IE 6]>This is IE 6<br><![endif]-->
|
||||||
|
@ -28,7 +27,7 @@ exports[`conditional.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`for_debugging.html - parse5-verify 1`] = `
|
exports[`for_debugging.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
@ -50,7 +49,6 @@ exports[`for_debugging.html - parse5-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
|
||||||
<body>
|
<body>
|
||||||
<!-- Do not display this at the moment
|
<!-- Do not display this at the moment
|
||||||
<img border="0" src="pic_trulli.jpg" alt="Trulli">
|
<img border="0" src="pic_trulli.jpg" alt="Trulli">
|
||||||
|
@ -68,7 +66,7 @@ exports[`for_debugging.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`hidden.html - parse5-verify 1`] = `
|
exports[`hidden.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
@ -85,7 +83,6 @@ exports[`hidden.html - parse5-verify 1`] = `
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
|
||||||
<body>
|
<body>
|
||||||
<!--This is a comment-->
|
<!--This is a comment-->
|
||||||
<!-- This is a comment -->
|
<!-- This is a comment -->
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`empty.html - parse5-verify 1`] = `
|
exports[`empty.html - html-verify 1`] = `
|
||||||
<style></style>
|
<style></style>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`less.html - parse5-verify 1`] = `
|
exports[`less.html - html-verify 1`] = `
|
||||||
<style type="text/less">
|
<style type="text/less">
|
||||||
@nice-blue: #5B83AD;
|
@nice-blue: #5B83AD;
|
||||||
@light-blue: @nice-blue + #111;
|
@light-blue: @nice-blue + #111;
|
||||||
|
@ -46,7 +46,7 @@ exports[`less.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`postcss.html - parse5-verify 1`] = `
|
exports[`postcss.html - html-verify 1`] = `
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body { background: navy; color: yellow; }
|
body { background: navy; color: yellow; }
|
||||||
</style>
|
</style>
|
||||||
|
@ -71,7 +71,7 @@ body {
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`scss.html - parse5-verify 1`] = `
|
exports[`scss.html - html-verify 1`] = `
|
||||||
<style type="text/x-scss">
|
<style type="text/x-scss">
|
||||||
$font-stack: Helvetica, sans-serif;
|
$font-stack: Helvetica, sans-serif;
|
||||||
$primary-color: #333;
|
$primary-color: #333;
|
||||||
|
@ -114,7 +114,7 @@ body {
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`simple.html - parse5-verify 1`] = `
|
exports[`simple.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -154,7 +154,7 @@ exports[`simple.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`single-style.html - parse5-verify 1`] = `
|
exports[`single-style.html - html-verify 1`] = `
|
||||||
<style>a { color: red; }</style>
|
<style>a { color: red; }</style>
|
||||||
<style>
|
<style>
|
||||||
h1 {
|
h1 {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`html4.01_frameset.html - parse5-verify 1`] = `
|
exports[`html4.01_frameset.html - html-verify 1`] = `
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
"http://www.w3.org/TR/html4/frameset.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
@ -17,7 +17,7 @@ exports[`html4.01_frameset.html - parse5-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>An HTML standard template</title>
|
<title>An HTML standard template</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>… Your HTML content here …</p>
|
<p>… Your HTML content here …</p>
|
||||||
|
@ -26,7 +26,7 @@ exports[`html4.01_frameset.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html4.01_strict.html - parse5-verify 1`] = `
|
exports[`html4.01_strict.html - html-verify 1`] = `
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/html4/strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
@ -43,7 +43,7 @@ exports[`html4.01_strict.html - parse5-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>An HTML standard template</title>
|
<title>An HTML standard template</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>… Your HTML content here …</p>
|
<p>… Your HTML content here …</p>
|
||||||
|
@ -52,7 +52,7 @@ exports[`html4.01_strict.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html4.01_transitional.html - parse5-verify 1`] = `
|
exports[`html4.01_transitional.html - html-verify 1`] = `
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
@ -69,7 +69,7 @@ exports[`html4.01_transitional.html - parse5-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>An HTML standard template</title>
|
<title>An HTML standard template</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>… Your HTML content here …</p>
|
<p>… Your HTML content here …</p>
|
||||||
|
@ -78,7 +78,7 @@ exports[`html4.01_transitional.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`html5.html - parse5-verify 1`] = `
|
exports[`html5.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -94,7 +94,7 @@ exports[`html5.html - parse5-verify 1`] = `
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>An HTML standard template</title>
|
<title>An HTML standard template</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>… Your HTML content here …</p>
|
<p>… Your HTML content here …</p>
|
||||||
|
@ -103,7 +103,7 @@ exports[`html5.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`xhtml1.1.html - parse5-verify 1`] = `
|
exports[`xhtml1.1.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`empty.html - parse5-verify 1`] = `
|
exports[`empty.html - html-verify 1`] = `
|
||||||
<script></script>
|
<script></script>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<script></script>
|
<script></script>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`js.html - parse5-verify 1`] = `
|
exports[`js.html - html-verify 1`] = `
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var message = "Alert!";
|
var message = "Alert!";
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ alert(message);
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`simple.html - parse5-verify 1`] = `
|
exports[`simple.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -81,7 +81,7 @@ exports[`simple.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`single-script.html - parse5-verify 1`] = `
|
exports[`single-script.html - html-verify 1`] = `
|
||||||
<script>alert('test');</script>
|
<script>alert('test');</script>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("demo").innerHTML = "Hello JavaScript!";
|
document.getElementById("demo").innerHTML = "Hello JavaScript!";
|
||||||
|
@ -96,7 +96,7 @@ document.getElementById("demo").innerHTML = "Hello JavaScript!";
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`typescript.html - parse5-verify 1`] = `
|
exports[`typescript.html - html-verify 1`] = `
|
||||||
<script type="application/x-typescript">
|
<script type="application/x-typescript">
|
||||||
class Student {
|
class Student {
|
||||||
fullName: string;
|
fullName: string;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`document.html - parse5-verify 1`] = `
|
exports[`document.html - html-verify 1`] = `
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="no-js" lang="en">
|
<html class="no-js" lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -48,7 +48,7 @@ exports[`document.html - parse5-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js" lang="en">
|
<html class="no-js" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||||
<title>Title</title>
|
<title>Title</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`svg.html - parse5-verify 1`] = `
|
exports[`svg.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -27,7 +27,7 @@ exports[`svg.html - parse5-verify 1`] = `
|
||||||
stroke="green"
|
stroke="green"
|
||||||
stroke-width="4"
|
stroke-width="4"
|
||||||
fill="yellow"
|
fill="yellow"
|
||||||
></circle>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`symbol_entitites.html - parse5-verify 1`] = `
|
exports[`symbol_entitites.html - html-verify 1`] = `
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
<p>I will display €</p>
|
<p>I will display €</p>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,13 +1,26 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`case-sensitive.html - parse5-verify 1`] = `
|
exports[`case-sensitive.html - html-verify 1`] = `
|
||||||
<CaseSensitive CaseSensitive="true">hello world</CaseSensitive>
|
<CaseSensitive CaseSensitive="true">hello world</CaseSensitive>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<CaseSensitive CaseSensitive="true">hello world</CaseSensitive>
|
<CaseSensitive CaseSensitive="true">hello world</CaseSensitive>
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`pre.html - parse5-verify 1`] = `
|
exports[`custom-self-closing.html - html-verify 1`] = `
|
||||||
|
<div>
|
||||||
|
<ABC />
|
||||||
|
<span></span>
|
||||||
|
</div>
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
<div>
|
||||||
|
<ABC />
|
||||||
|
<span></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`pre.html - html-verify 1`] = `
|
||||||
<pre>
|
<pre>
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -175,7 +188,7 @@ ___________________________
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`tags.html - parse5-verify 1`] = `
|
exports[`tags.html - html-verify 1`] = `
|
||||||
<br/>
|
<br/>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
@ -234,10 +247,10 @@ exports[`tags.html - parse5-verify 1`] = `
|
||||||
<br
|
<br
|
||||||
very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute
|
very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute
|
||||||
/>
|
/>
|
||||||
<br attribute-a="value">
|
<br attribute-a="value" />
|
||||||
<br attribute-a="value">
|
<br attribute-a="value" />
|
||||||
<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">
|
<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" />
|
||||||
<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">
|
<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" />
|
||||||
<br
|
<br
|
||||||
attribute-a="value"
|
attribute-a="value"
|
||||||
attribute-b="value"
|
attribute-b="value"
|
||||||
|
@ -342,7 +355,7 @@ exports[`tags.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`textarea.html - parse5-verify 1`] = `
|
exports[`textarea.html - html-verify 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -403,7 +416,7 @@ exports[`textarea.html - parse5-verify 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`unsupported.html - parse5-verify 1`] = `
|
exports[`unsupported.html - html-verify 1`] = `
|
||||||
<center></center>
|
<center></center>
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
<center></center>
|
<center></center>
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<div>
|
||||||
|
<ABC />
|
||||||
|
<span></span>
|
||||||
|
</div>
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`invalid.html - parse5-verify 1`] = `
|
exports[`invalid.html - html-verify 1`] = `
|
||||||
---
|
---
|
||||||
invalid:
|
invalid:
|
||||||
invalid:
|
invalid:
|
||||||
|
@ -22,7 +22,7 @@ invalid:
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`yaml.html - parse5-verify 1`] = `
|
exports[`yaml.html - html-verify 1`] = `
|
||||||
---
|
---
|
||||||
hello: world
|
hello: world
|
||||||
---
|
---
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`html-with-css-style.html - parse5-verify 1`] = `
|
exports[`html-with-css-style.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`html-with-js-script.html - parse5-verify 1`] = `
|
exports[`html-with-js-script.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`html-with-ts-script.html - parse5-verify 1`] = `
|
exports[`html-with-ts-script.html - html-verify 1`] = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
run_spec(__dirname, ["parse5"]);
|
run_spec(__dirname, ["html"]);
|
||||||
|
|
|
@ -10,8 +10,8 @@ const sources = [
|
||||||
"parser-flow.js",
|
"parser-flow.js",
|
||||||
"parser-glimmer.js",
|
"parser-glimmer.js",
|
||||||
"parser-graphql.js",
|
"parser-graphql.js",
|
||||||
|
"parser-html.js",
|
||||||
"parser-markdown.js",
|
"parser-markdown.js",
|
||||||
"parser-parse5.js",
|
|
||||||
"parser-postcss.js",
|
"parser-postcss.js",
|
||||||
"parser-typescript.js",
|
"parser-typescript.js",
|
||||||
"parser-vue.js",
|
"parser-vue.js",
|
||||||
|
|
|
@ -62,7 +62,7 @@ Format options:
|
||||||
--no-bracket-spacing Do not print spaces between brackets.
|
--no-bracket-spacing Do not print spaces between brackets.
|
||||||
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml>
|
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html>
|
||||||
Which parser to use.
|
Which parser to use.
|
||||||
--print-width <int> The line length where Prettier will try wrap.
|
--print-width <int> The line length where Prettier will try wrap.
|
||||||
Defaults to 80.
|
Defaults to 80.
|
||||||
|
@ -152,7 +152,7 @@ exports[`show warning with --help not-found (typo) (stderr) 1`] = `
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`show warning with --help not-found (typo) (stdout) 1`] = `
|
exports[`show warning with --help not-found (typo) (stdout) 1`] = `
|
||||||
"--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml>
|
"--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html>
|
||||||
|
|
||||||
Which parser to use.
|
Which parser to use.
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@ Valid options:
|
||||||
mdx MDX
|
mdx MDX
|
||||||
vue Vue
|
vue Vue
|
||||||
yaml YAML
|
yaml YAML
|
||||||
|
html HTML
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -198,7 +199,7 @@ Format options:
|
||||||
--no-bracket-spacing Do not print spaces between brackets.
|
--no-bracket-spacing Do not print spaces between brackets.
|
||||||
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml>
|
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html>
|
||||||
Which parser to use.
|
Which parser to use.
|
||||||
--print-width <int> The line length where Prettier will try wrap.
|
--print-width <int> The line length where Prettier will try wrap.
|
||||||
Defaults to 80.
|
Defaults to 80.
|
||||||
|
|
|
@ -267,7 +267,7 @@ exports[`show detailed usage with --help no-semi (write) 1`] = `Array []`;
|
||||||
exports[`show detailed usage with --help parser (stderr) 1`] = `""`;
|
exports[`show detailed usage with --help parser (stderr) 1`] = `""`;
|
||||||
|
|
||||||
exports[`show detailed usage with --help parser (stdout) 1`] = `
|
exports[`show detailed usage with --help parser (stdout) 1`] = `
|
||||||
"--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml>
|
"--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html>
|
||||||
|
|
||||||
Which parser to use.
|
Which parser to use.
|
||||||
|
|
||||||
|
@ -287,6 +287,7 @@ Valid options:
|
||||||
mdx MDX
|
mdx MDX
|
||||||
vue Vue
|
vue Vue
|
||||||
yaml YAML
|
yaml YAML
|
||||||
|
html HTML
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ exports[` 1`] = `
|
||||||
+ Defaults to bar.
|
+ Defaults to bar.
|
||||||
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
--jsx-bracket-same-line Put > on the last line instead of at a new line.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml>
|
--parser <flow|babylon|typescript|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html>
|
||||||
Which parser to use.
|
Which parser to use.
|
||||||
--print-width <int> The line length where Prettier will try wrap."
|
--print-width <int> The line length where Prettier will try wrap."
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -146,6 +146,12 @@ This option cannot be used with --range-start and --range-end.",
|
||||||
"yaml",
|
"yaml",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Object {
|
||||||
|
"description": "HTML",
|
||||||
|
"enum": Array [
|
||||||
|
"html",
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"pluginSearchDirs": Object {
|
"pluginSearchDirs": Object {
|
||||||
|
|
|
@ -412,7 +412,16 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
- First value
|
- First value
|
||||||
+ Second value
|
+ Second value
|
||||||
|
|
||||||
@@ -14,10 +14,16 @@
|
@@ -8,16 +8,25 @@
|
||||||
|
\\"flow\\",
|
||||||
|
],
|
||||||
|
\\"GraphQL\\": Array [
|
||||||
|
\\"graphql\\",
|
||||||
|
],
|
||||||
|
+ \\"HTML\\": Array [
|
||||||
|
+ \\"html\\",
|
||||||
|
+ ],
|
||||||
|
\\"JSON\\": Array [
|
||||||
\\"json\\",
|
\\"json\\",
|
||||||
],
|
],
|
||||||
\\"JSON with Comments\\": Array [
|
\\"JSON with Comments\\": Array [
|
||||||
|
@ -429,7 +438,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
\\"flow\\",
|
\\"flow\\",
|
||||||
],
|
],
|
||||||
\\"JavaScript\\": Array [
|
\\"JavaScript\\": Array [
|
||||||
@@ -25,10 +31,13 @@
|
@@ -25,10 +34,13 @@
|
||||||
\\"flow\\",
|
\\"flow\\",
|
||||||
],
|
],
|
||||||
\\"Less\\": Array [
|
\\"Less\\": Array [
|
||||||
|
@ -443,7 +452,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
],
|
],
|
||||||
\\"PostCSS\\": Array [
|
\\"PostCSS\\": Array [
|
||||||
\\"css\\",
|
\\"css\\",
|
||||||
@@ -37,12 +46,26 @@
|
@@ -37,12 +49,26 @@
|
||||||
\\"scss\\",
|
\\"scss\\",
|
||||||
],
|
],
|
||||||
\\"TypeScript\\": Array [
|
\\"TypeScript\\": Array [
|
||||||
|
@ -470,7 +479,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
\\"type\\": \\"boolean\\",
|
\\"type\\": \\"boolean\\",
|
||||||
},
|
},
|
||||||
\\"cursorOffset\\": Object {
|
\\"cursorOffset\\": Object {
|
||||||
@@ -73,16 +96,29 @@
|
@@ -73,16 +99,30 @@
|
||||||
\\"typescript\\",
|
\\"typescript\\",
|
||||||
\\"css\\",
|
\\"css\\",
|
||||||
\\"less\\",
|
\\"less\\",
|
||||||
|
@ -483,6 +492,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
+ \\"mdx\\",
|
+ \\"mdx\\",
|
||||||
+ \\"vue\\",
|
+ \\"vue\\",
|
||||||
+ \\"yaml\\",
|
+ \\"yaml\\",
|
||||||
|
+ \\"html\\",
|
||||||
],
|
],
|
||||||
- \\"default\\": \\"babylon\\",
|
- \\"default\\": \\"babylon\\",
|
||||||
+ \\"default\\": undefined,
|
+ \\"default\\": undefined,
|
||||||
|
@ -501,7 +511,7 @@ exports[`API getSupportInfo() with version 1.8.2 -> undefined 1`] = `
|
||||||
\\"range\\": Object {
|
\\"range\\": Object {
|
||||||
\\"end\\": Infinity,
|
\\"end\\": Infinity,
|
||||||
\\"start\\": 0,
|
\\"start\\": 0,
|
||||||
@@ -90,14 +126,15 @@
|
@@ -90,14 +130,15 @@
|
||||||
},
|
},
|
||||||
\\"type\\": \\"int\\",
|
\\"type\\": \\"int\\",
|
||||||
},
|
},
|
||||||
|
@ -812,6 +822,29 @@ exports[`CLI --support-info (stdout) 1`] = `
|
||||||
\\"since\\": \\"1.15.0\\",
|
\\"since\\": \\"1.15.0\\",
|
||||||
\\"vscodeLanguageIds\\": [\\"mdx\\"]
|
\\"vscodeLanguageIds\\": [\\"mdx\\"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
\\"aceMode\\": \\"html\\",
|
||||||
|
\\"aliases\\": [\\"xhtml\\"],
|
||||||
|
\\"codemirrorMimeType\\": \\"text/html\\",
|
||||||
|
\\"codemirrorMode\\": \\"htmlmixed\\",
|
||||||
|
\\"color\\": \\"#e34c26\\",
|
||||||
|
\\"extensions\\": [
|
||||||
|
\\".html\\",
|
||||||
|
\\".htm\\",
|
||||||
|
\\".html.hl\\",
|
||||||
|
\\".inc\\",
|
||||||
|
\\".st\\",
|
||||||
|
\\".xht\\",
|
||||||
|
\\".xhtml\\"
|
||||||
|
],
|
||||||
|
\\"linguistLanguageId\\": 146,
|
||||||
|
\\"name\\": \\"HTML\\",
|
||||||
|
\\"parsers\\": [\\"html\\"],
|
||||||
|
\\"since\\": \\"1.15.0\\",
|
||||||
|
\\"tmScope\\": \\"text.html.basic\\",
|
||||||
|
\\"type\\": \\"markup\\",
|
||||||
|
\\"vscodeLanguageIds\\": [\\"html\\"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
\\"aceMode\\": \\"html\\",
|
\\"aceMode\\": \\"html\\",
|
||||||
\\"color\\": \\"#2c3e50\\",
|
\\"color\\": \\"#2c3e50\\",
|
||||||
|
@ -940,7 +973,8 @@ exports[`CLI --support-info (stdout) 1`] = `
|
||||||
{ \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" },
|
{ \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" },
|
||||||
{ \\"description\\": \\"MDX\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"mdx\\" },
|
{ \\"description\\": \\"MDX\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"mdx\\" },
|
||||||
{ \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" },
|
{ \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" },
|
||||||
{ \\"description\\": \\"YAML\\", \\"since\\": \\"1.14.0\\", \\"value\\": \\"yaml\\" }
|
{ \\"description\\": \\"YAML\\", \\"since\\": \\"1.14.0\\", \\"value\\": \\"yaml\\" },
|
||||||
|
{ \\"description\\": \\"HTML\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"html\\" }
|
||||||
],
|
],
|
||||||
\\"description\\": \\"Which parser to use.\\",
|
\\"description\\": \\"Which parser to use.\\",
|
||||||
\\"name\\": \\"parser\\",
|
\\"name\\": \\"parser\\",
|
||||||
|
|
|
@ -282,7 +282,7 @@ export default function(parser) {
|
||||||
" {{ body }}",
|
" {{ body }}",
|
||||||
"</div> </div>"
|
"</div> </div>"
|
||||||
].join("\n");
|
].join("\n");
|
||||||
case "parse5":
|
case "html":
|
||||||
return [
|
return [
|
||||||
"<!DOCTYPE html>",
|
"<!DOCTYPE html>",
|
||||||
'<HTML CLASS="no-js mY-ClAsS">',
|
'<HTML CLASS="no-js mY-ClAsS">',
|
||||||
|
|
|
@ -45,8 +45,6 @@ function getMarkdownSyntax(options) {
|
||||||
return "jsonc";
|
return "jsonc";
|
||||||
case "glimmer":
|
case "glimmer":
|
||||||
return "hbs";
|
return "hbs";
|
||||||
case "parse5":
|
|
||||||
return "html";
|
|
||||||
default:
|
default:
|
||||||
return options.parser;
|
return options.parser;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ toolbox.precache([
|
||||||
"lib/parser-flow.js",
|
"lib/parser-flow.js",
|
||||||
"lib/parser-glimmer.js",
|
"lib/parser-glimmer.js",
|
||||||
"lib/parser-graphql.js",
|
"lib/parser-graphql.js",
|
||||||
|
"lib/parser-html.js",
|
||||||
"lib/parser-markdown.js",
|
"lib/parser-markdown.js",
|
||||||
"lib/parser-parse5.js",
|
|
||||||
"lib/parser-postcss.js",
|
"lib/parser-postcss.js",
|
||||||
"lib/parser-typescript.js",
|
"lib/parser-typescript.js",
|
||||||
"lib/parser-vue.js",
|
"lib/parser-vue.js",
|
||||||
|
|
|
@ -93,9 +93,9 @@ var parsers = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// HTML
|
// HTML
|
||||||
get parse5() {
|
get html() {
|
||||||
importScriptOnce("lib/parser-parse5.js");
|
importScriptOnce("lib/parser-html.js");
|
||||||
return prettierPlugins.parse5.parsers.parse5;
|
return prettierPlugins.html.parsers.html;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
45
yarn.lock
45
yarn.lock
|
@ -1766,16 +1766,44 @@ doctrine@^2.0.2, doctrine@^2.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
esutils "^2.0.2"
|
esutils "^2.0.2"
|
||||||
|
|
||||||
|
dom-serializer@0:
|
||||||
|
version "0.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
|
||||||
|
dependencies:
|
||||||
|
domelementtype "~1.1.1"
|
||||||
|
entities "~1.1.1"
|
||||||
|
|
||||||
domain-browser@^1.1.1:
|
domain-browser@^1.1.1:
|
||||||
version "1.1.7"
|
version "1.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
|
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
|
||||||
|
|
||||||
|
domelementtype@1, domelementtype@^1.3.0:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
|
||||||
|
|
||||||
|
domelementtype@~1.1.1:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
|
||||||
|
|
||||||
domexception@^1.0.0:
|
domexception@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
|
resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
|
||||||
dependencies:
|
dependencies:
|
||||||
webidl-conversions "^4.0.2"
|
webidl-conversions "^4.0.2"
|
||||||
|
|
||||||
|
domhandler@2.4.2, domhandler@^2.3.0:
|
||||||
|
version "2.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
|
||||||
|
dependencies:
|
||||||
|
domelementtype "1"
|
||||||
|
|
||||||
|
domutils@^1.5.1:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
|
||||||
|
dependencies:
|
||||||
|
dom-serializer "0"
|
||||||
|
domelementtype "1"
|
||||||
|
|
||||||
ecc-jsbn@~0.1.1:
|
ecc-jsbn@~0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
|
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
|
||||||
|
@ -1836,6 +1864,10 @@ enhanced-resolve@^3.4.0:
|
||||||
object-assign "^4.0.1"
|
object-assign "^4.0.1"
|
||||||
tapable "^0.2.7"
|
tapable "^0.2.7"
|
||||||
|
|
||||||
|
entities@^1.1.1, entities@~1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
|
||||||
|
|
||||||
errno@^0.1.3:
|
errno@^0.1.3:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
|
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
|
||||||
|
@ -2717,6 +2749,17 @@ html-tag-names@1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22"
|
resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22"
|
||||||
|
|
||||||
|
htmlparser2@3.9.2:
|
||||||
|
version "3.9.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
|
||||||
|
dependencies:
|
||||||
|
domelementtype "^1.3.0"
|
||||||
|
domhandler "^2.3.0"
|
||||||
|
domutils "^1.5.1"
|
||||||
|
entities "^1.1.1"
|
||||||
|
inherits "^2.0.1"
|
||||||
|
readable-stream "^2.0.2"
|
||||||
|
|
||||||
http-signature@~1.1.0:
|
http-signature@~1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
|
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
|
||||||
|
@ -4390,7 +4433,7 @@ parse5@4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
|
resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
|
||||||
|
|
||||||
parse5@5.0.0, parse5@^5.0.0:
|
parse5@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.0.0.tgz#4d02710d44f3c3846197a11e205d4ef17842b81a"
|
resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.0.0.tgz#4d02710d44f3c3846197a11e205d4ef17842b81a"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue