popcodeorg / popcodeorg/popcode
<h1> within <p> causes following closing tags to turn red
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 191
- Forks
- 143
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 5
Description
Describe the bug
Putting an <h1> tag inside of a <p> tag causes the following closing tags to turn red.
To Reproduce
Steps to reproduce the behavior:
- Go to popcode.org
- Add the following HTML:
<!DOCTYPE html>
<html>
<head>
<title>Funfunctionality</title>
</head>
<body>
<div class="webname">
<p>
<h1>Funfunctionality</h1>
</p>
</div>
</body>
</html>
- Notice color of closing tags
Expected behavior
Since Popcode is an opinionated editor, I'd recommend an error message like:
You can't put <h1> / <h2> etc header tags inside of a paragraph element. Put them before or after the <p> tag.
Screenshots

Notice that the page renders; Popcode does not detect any errors.
Desktop (please complete the following information):
- OS: MacOS
- Browser Firefox & Chrome
- Version Latest
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 reproducing the issue at popcode.org with the provided HTML, then trace the editor's handling of heading elements nested inside paragraph elements and its existing error or highlighting behavior. Done means the invalid nesting is handled consistently with the editor's opinionated behavior and the closing tags no longer turn red misleadingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100