Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produces invalid HTML on nested HTML divs #139

Open
sol opened this issue Oct 29, 2012 · 3 comments
Open

Produces invalid HTML on nested HTML divs #139

sol opened this issue Oct 29, 2012 · 3 comments

Comments

@sol
Copy link

sol commented Oct 29, 2012

Steps to reproduce

Parse/render the following input:

<div>
<div>
foobar
</div>
</div>

Expected result:

<div>
    <div>fobar</div>
</div>

Actual result:

<div>
    <div>fobar</div>
    <p>
</div>
</p>

Bablemark says that Markdown.pl 1.0.1 has the same bug. So you could probably argue that this is the intended behavior. But personally I think it's a bug. I think there is no use case for producing invalid HTML.

@sol
Copy link
Author

sol commented Oct 29, 2012

Seems that this is a duplicate of #134. I still leave it open, because my test case is minimal.

@sol
Copy link
Author

sol commented Oct 29, 2012

Ok, after reading the C source it is evident, that I can work around this by indenting nested HTML, e.g.:

<div>
  <div>
  foobar
  </div>
</div>

@mildsunrise
Copy link

This is a consequence of how Sundown looks for the ending tag.

We've just improved HTML processing in Hoedown so the above cases should work just fine, see hoedown#104.

GerHobbelt pushed a commit to GerHobbelt/soldout that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants