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

Function parseHtml

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

@param {string} input @param {ParseOptions} parseOptions

(input, parseOptions)

Source from the content-addressed store, hash-verified

26@param {ParseOptions} parseOptions
27*/
28function parseHtml(input, parseOptions) {
29 const { rootNodes, errors } = angularHtmlParserParse(
30 input,
31 toAngularHtmlParserParseOptions(parseOptions),
32 );
33
34 if (errors.length > 0) {
35 throwParseError(errors[0]);
36 }
37
38 return { parseOptions, rootNodes };
39}
40
41/**
42@param {string} input

Callers 2

parseVueFunction · 0.85

Calls 2

throwParseErrorFunction · 0.85

Tested by

no test coverage detected