(
html: string,
implicitTags: string[] = [],
implicitAttrs: {[k: string]: string[]} = {},
)
| 702 | } |
| 703 | |
| 704 | function extract( |
| 705 | html: string, |
| 706 | implicitTags: string[] = [], |
| 707 | implicitAttrs: {[k: string]: string[]} = {}, |
| 708 | ): [string[], string, string, string][] { |
| 709 | const result = extractMessages( |
| 710 | parseHtml(html), |
| 711 | implicitTags, |
| 712 | implicitAttrs, |
| 713 | /* preserveSignificantWhitespace */ true, |
| 714 | ); |
| 715 | |
| 716 | if (result.errors.length > 0) { |
| 717 | throw new Error(`unexpected errors: ${result.errors.join('\n')}`); |
| 718 | } |
| 719 | |
| 720 | return result.messages.map((message) => [ |
| 721 | serializeI18nNodes(message.nodes), |
| 722 | message.meaning, |
| 723 | message.description, |
| 724 | message.id, |
| 725 | ]) as [string[], string, string, string][]; |
| 726 | } |
| 727 | |
| 728 | function extractErrors( |
| 729 | html: string, |
no test coverage detected
searching dependent graphs…