parse5
parse5 copied to clipboard
HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant.
I'm running latest node in vsc, and just by running this i get this error: RewritingStream is not a constructor ```js const RewritingStream = require('parse5-html-rewriting-stream'); const rewriter = new RewritingStream();...
Try to import ```ts import { Node } from 'parse5/dist/tree-adapters/default' ``` ```ts Error: Missing "./dist/tree-adapters/default" export in "parse5" package ```
I use the API of p5 to get certain nodes. I then transform those nodes. For that, I need their types. In v7, it seems that they are not exported,...
Google used to maintain a library called `dom5` - a bunch of utils useful for traversing the parse5 AST amongst other things. Various other projects also implement modified versions of...
When creating a custom parser we need to check the `insertionMode` field against a value. Without the `InsertionMode` enum exported we have to use a magic number or redefine another...
This should already be throwing warnings unless we disabled it explicitly. We should: - Change the level to `error` - Remove all possible `eslint-ignore` lines which currently disable this rule...
I'm experimenting with parse5-html-rewriting-stream and not seeing an easy way to remove/delete an element along with all children. Not emitting a tag removes that particular tag from output, but the...
https://github.com/inikulin/parse5/blob/f5dd91e2dd846ec5cfeda425c652ce47dffb0539/packages/parse5/lib/parser/parser-location-info.test.ts#L235-L290 This test currently creates its own location structure and asserts that it ends up in the resulting node. It currently passes because of its parameters being `any`. However, if...
With #447 and #449, we now run html5lib tests simultaneously with the forked tests. The remaining step is to drop the fork. The remaining issue is a misalignment in error...
We discussed this in https://github.com/inikulin/parse5/pull/362#pullrequestreview-852749377. Jest works alright as a test runner for now, but I'm happy to switch should we agree on an alternative.