Error on opening tag flagging error on closing tag saying opening tag is missing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 474
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
Describe the bug
When there is no space between 2 attributes on an element then the closing is reported as Tag must be paired, no start tag: [ </div> ]
To Reproduce
Steps to reproduce the behavior:
Enter this code into the playground https://htmlhint-playground.netlify.app/
Making sure the tag-pair is checked.
<div id="abc"class="def">
test
</div>
Expected behavior
I would not expect to see the error on the closing tag.
I would expect to see an error related to there being no space between the attributes.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS 14.5
- Browser: Chrome
- Version: 127.
Additional context
I realise this is a duplicate of #18 but I think they maybe got closed due to lack of information.
This is quite an edge case but when looking at a large file it can be hard to work out why there is an issue showing.
Contributor guide
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
Reproduce the issue in the HTMLHint playground with the provided snippet and the tag-pair rule enabled. Trace how the parser handles adjacent attributes and closing tags; done when the closing tag is not falsely reported as missing an opening tag and the missing attribute space receives the appropriate diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100