hyperx
hyperx copied to clipboard
handle optional closing tags for self-closing tags. fixes #41
fixes:
- https://github.com/choojs/hyperx/issues/41
- https://github.com/choojs/nanohtml/issues/151
This changes causes the tests from https://github.com/choojs/hyperx/pull/52/commits/f1803d5443a83a64d169af542e9124d55f105952 to pass, and they've been included too.
Some follow up notes on this:
- there is some noise in this PR (some extra unneeded commits.) I'm happy to send a clean PR if this looks like something we want
- I made a few small style changes to the code, because it's just really dense and hard to read with everything so squashed together. If we're really against these changes I'm willing to re-submit without those formatting changes.
- while these changes still pass all the existing unit tests, we would need to do a semver major bump if this were to get released.
- if we're going to bother making breaking changes, are there other parser fixes we want to make?
- does it make sense to drop cjs in favor of a pure esm module, since we're making a breaking api change anyway?
https://youtu.be/_FrOQC-zEog?t=41
@goto-bus-stop despite being a maintainer, I can't seem to approve my own PRs. Would you be willing to review/approve this? I've been using these changes for a while.
nevermind, I'm not sure why I can merge from this page, but not from the PR view.