popcodeorg / popcodeorg/popcode

<h1> within <p> causes following closing tags to turn red

Open
#2,517 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Go to popcode.org
  2. Add the following HTML:
<!DOCTYPE html>
<html>
    <head>
        <title>Funfunctionality</title>
    </head>
    <body>
        <div class="webname">
            <p>
            	<h1>Funfunctionality</h1>
            </p>
        </div>
    </body>
</html>
  1. 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
image

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.