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

Problem with adjacent HTML tags #3

Closed
patkruk opened this issue Mar 10, 2015 · 2 comments
Closed

Problem with adjacent HTML tags #3

patkruk opened this issue Mar 10, 2015 · 2 comments

Comments

@patkruk
Copy link

patkruk commented Mar 10, 2015

Hey,

There seems to be a problem with adjacent HTML tags.

For example, try to truncate this to 25 characters:

<p>Lorem Ipsum</p><p>Lorem <div>Lorem Ipsum</div> Ipsum</p>

and check the output. You should notice an issue with the markdown.

If I change the second paragraph to h1, everything seems to be fine.

@judev
Copy link
Owner

judev commented Mar 11, 2015

The DOM implementation will automatically add an ending </p> tag before the opening <div> which is why you're seeing this.

This is because <div> elements should not occur inside <p> elements:
http://stackoverflow.com/questions/8397852/why-p-tag-cant-contain-div-tag-inside-it

@patkruk
Copy link
Author

patkruk commented Mar 11, 2015

Got it, thanks!

@patkruk patkruk closed this as completed Mar 11, 2015
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