marko-js / marko-js/htmljs-parser
Closing tag names include trailing whitespace
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 18
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 2
Description
The following HTML/Marko doesn't parse because the closeTagName is parsed with whitespace and so the open and close tag names don't match.
<span class="dolorum atque aspernatur"
>Est molestiae sunt facilis qui rem.</span
>
<span class="dolorum atque aspernatur"
>Est molestiae sunt facilis qui rem.</span
^^^^
The closing "span\n" tag does not match the corresponding opening "span" tag.
>
I would expect the closeTagName to be "span" and the closeTagEnd to be "\n>"... But I don't know if that makes sense. Alternatively, we consume and discard the whitespace between closeTagName and closeTagEnd. I also don't know how this change would impact upstream dependencies.
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 by locating the parser logic for closeTagName and closeTagEnd, then reproduce the HTML/Marko example from the issue to inspect how whitespace is included in the closing name. Decide whether the name should exclude the whitespace or whether the parser should discard it, and verify that the closing span matches the opening tag without breaking related parsing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100