-

-
PostHTML Parser
-
- Parse HTML/XML to [PostHTML AST](https://github.com/posthtml/posthtml-parser#posthtml-ast-format)
-
- [![Version][npm-version-shield]][npm]
- [![Build][github-ci-shield]][github-ci]
- [![License][license-shield]][license]
- [![Coverage][coverage-shield]][coverage]
-
+# PostHTML Parser
+
+Parse HTML/XML into a [PostHTML AST](#posthtml-ast-format) using [htmlparser2](https://github.com/fb55/htmlparser2).
## Installation
Requires Node.js `^20.19.0 || >=22.12.0`. These versions support synchronous CommonJS loading of the ESM-only `htmlparser2` backend. Both `require()` and native ESM imports expose the synchronous `parser` API.
-TypeScript consumers need TypeScript 5.3 or later. For development, use Node.js 24 (`nvm install && nvm use`).
+TypeScript consumers need TypeScript 5.3 or later.
```sh
npm install posthtml-parser
@@ -22,156 +14,69 @@ npm install posthtml-parser
## Usage
-Input HTML:
-
-```html
-