Fragile HTML parser -> create Debug bundle
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
In this example, I didn't explicitly close a couple of `` elements:
https://codesandbox.io/s/vigilant-goodall-hqh8u
That is, `` and other HTML void elements seem to require a trailing slash, e.g. `` - but there is no error message when void elements aren't explicitly terminated, and you get some strange results in the DOM.
Is the parser XHTML by design?
Handling HTML 5 void elements shouldn't require much work, and shouldn't add much to the footprint, I think - I wrote a toy HTML 5 parser myself in 0.5 KB, and [the magic](https://gist.github.com/mindplay-dk/5167cf7e123064c287c65174593a52ab#file-parser-ts-L51) is less than 100 bytes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and locate the project's HTML parser entry point. Confirm how void elements such as are handled without a trailing slash, then add or update coverage for the observed DOM behavior and verify the reproduction is corrected; the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100