-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Marked adds extra/unnecessary <p> tags to list elements #1298
Comments
Why is it incorrect to add |
Because that doesn't make any sense. I put a new line between AAA and BBB, so why are other list items being affect by this? |
Similar situation: commonmark |
according to the spec:
So CommonMark seems to do it correctly. Marked should include |
That's very odd. I'd like to see a real-world use case where having a line break on the last element of a list should affect every element that comes before or after it, instead of just affecting 'it'. |
Describe the bug
When using lists with linebreak separation, Marked adds unnecessary <p> tags to list items.
To Reproduce
Using CommonMark, the following adds erroneous <p> tags around the BBB, DDD, and EEE elements.
Using MarkedDemo, the following adds <p> tags around AAA (correct) and BBB (incorrect).
Expected behavior
With the above code, only AAA should have <p> element wrappers.
** Additional Example **
Above, CommonMark adds around AAA, BBB, DDD, EEE.
Above, MarkedDemo adds around DDD, and EEE
The text was updated successfully, but these errors were encountered: