MCPcopy Create free account
hub / github.com/prettier/prettier / shouldParseVueRootNodeAsHtml

Function shouldParseVueRootNodeAsHtml

src/language-html/parse/parse.js:115–121  ·  view source on GitHub ↗

@param {Ast.Node} node @returns {boolean}

(node)

Source from the content-addressed store, hash-verified

113@returns {boolean}
114*/
115function shouldParseVueRootNodeAsHtml(node) {
116 if (node.kind !== "element" || node.name !== "template") {
117 return false;
118 }
119 const language = node.attrs.find((attr) => attr.name === "lang")?.value;
120 return !language || language === "html";
121}
122
123function throwParseError(error) {
124 const {

Callers 1

parseVueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected