(source: string)
| 82 | * metadata like `data-composition-variables` lives. |
| 83 | */ |
| 84 | export function findHtmlTag(source: string): OpenTag | null { |
| 85 | const match = /<html\b([^<>]*)>/i.exec(source); |
| 86 | if (!match) return null; |
| 87 | return { |
| 88 | raw: match[0], |
| 89 | name: "html", |
| 90 | attrs: match[1] ?? "", |
| 91 | index: match.index, |
| 92 | }; |
| 93 | } |
| 94 | |
| 95 | export function findRootTag(source: string): OpenTag | null { |
| 96 | const bodyOpenMatch = /<body\b([^>]*)>/i.exec(source); |