import { parse } from "node-html-parser";
import type { HTMLElement } from "node-html-parser";
/**
* A parsed HTML document. Re-exported so the rest of the audit types against
* this module rather than the parser: `node-html-parser` is deliberately
* quarantined here, so swapping it stays a one-file change.
*/
export type HtmlDocument = HTMLElement;
/**
* Parse built HTML into a queryable tree.
*
* `blockTextElements` keeps the raw text of `