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
bug/feature html tags wrapped in paragraph tags #575
Comments
Looks like you left most of the default text in this issue. So not sure what issue you're seeing. Maybe close and reopen with clearer info. |
@nicholasserra looks like I missed off indentation in the first markdown snippet. Corrected. Hopefully that's more clear now. |
@nicholasserra I can't reopen this. Did you mean I should open a new issue? |
… regex
I've opened a PR to fix this. A side effect of the fix is that it won't automatically process the contents of the HTML tags as markdown. It will assume it's HTML and stop there. To get around this you'll need to use the markdown-in-html extra. Adding text = '''
<html markdown="1">
...
<body markdown="1">
...
* one
* two
</body>
</html>
'''
markdown2.markdown(text, extras=['markdown-in-html']) |
Fix `html`, `head` and `body` tags being wrapped in `<p>` tags (#575)
Describe the bug
html tags are being wrapped in
<p>
in a similar fashion to https://daringfireball.net/projects/markdown/To Reproduce
problem.md
Output
NOTE html, body, and img tags:
Expected behavior
I'm seeking clarity on this from project readme in
python-markdown2/README.md
Line 11 in ac7fd19
I was NOT expecting to see
<p>
tags around html, body. I have a larger example where it adds them around comments AND style tags.Debug info
Version of library being used:
Any extras being used: NONE
Additional context
Other implementations generate what I consider sane html BUT differ from Daring Fireball 2004 Perl version (which is known to have odd issues).
I've not attempted to debug. Curious what thoughts are on this. Thanks!
The text was updated successfully, but these errors were encountered: