luwes / luwes/sinuous

Fragile HTML parser -> create Debug bundle

Open
#75 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.