(html: string, tags: HtmlTagDescriptor[])
| 1599 | } |
| 1600 | |
| 1601 | function prependInjectFallback(html: string, tags: HtmlTagDescriptor[]) { |
| 1602 | // prepend to the html tag, append after doctype, or the document start |
| 1603 | if (htmlPrependInjectRE.test(html)) { |
| 1604 | return html.replace(htmlPrependInjectRE, `$&\n${serializeTags(tags)}`) |
| 1605 | } |
| 1606 | if (doctypePrependInjectRE.test(html)) { |
| 1607 | return html.replace(doctypePrependInjectRE, `$&\n${serializeTags(tags)}`) |
| 1608 | } |
| 1609 | return serializeTags(tags) + html |
| 1610 | } |
| 1611 | |
| 1612 | const unaryTags = new Set(['link', 'meta', 'base']) |
| 1613 |
no test coverage detected