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

Random <p> tags inserted when using HTML in markdown #571

Closed
dannykennedy opened this issue Mar 17, 2024 · 0 comments · Fixed by #572
Closed

Random <p> tags inserted when using HTML in markdown #571

dannykennedy opened this issue Mar 17, 2024 · 0 comments · Fixed by #572
Labels
Bug Priority High priority tickets

Comments

@dannykennedy
Copy link

dannykennedy commented Mar 17, 2024

Describe the bug

Random <p> tags inserted when using HTML in markdown

To Reproduce

My markdown also contains html, namely for example

<a href="https://www.goodreads.com/book/show/54774415-glimpses-from-beyond-the-ego">
<img src="../images/post-bcpov6zfbsbr-0.jpg" width="300px" height="auto" alt="Notes from a Dreamer on Dreaming"/>
</a>

When I convert this with markdown2.markdown, I get the following

<p><a href="https://www.goodreads.com/book/show/54774415-glimpses-from-beyond-the-ego"></p>

<p><img src="../images/post-bcpov6zfbsbr-0.jpg" width="300px" height="auto" alt="Notes from a Dreamer on Dreaming"/></p>

<p></a></p>

Which is no longer valid HTML.

Expected behavior

I would expect that section to be ignored by the parser, since it's already HTML. It should just return the same thing.

Debug info
Version of library being used:

2.4.12

@nicholasserra nicholasserra added Priority High priority tickets Bug labels Mar 18, 2024
nicholasserra added a commit that referenced this issue Mar 24, 2024
Process inline tags as HTML blocks when they span multiple lines (#571)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Priority High priority tickets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants