(html: string)
| 92 | }); |
| 93 | |
| 94 | export function parseHtml(html: string): Node[] { |
| 95 | const htmlParser = new HtmlParser(); |
| 96 | const parseResult = htmlParser.parse(html, 'i18n_ast spec', {tokenizeExpansionForms: true}); |
| 97 | if (parseResult.errors.length > 0) { |
| 98 | throw Error(`unexpected parse errors: ${parseResult.errors.join('\n')}`); |
| 99 | } |
| 100 | return parseResult.rootNodes; |
| 101 | } |
no test coverage detected
searching dependent graphs…