-
Notifications
You must be signed in to change notification settings - Fork 854
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
<html> tag wrapped in <p> #1308
Comments
The syntax rules state:
In fact, the current behavior exactly matches the reference implementation. Therefore, I'm surprised this ever worked for you. If anything, I would consider the old behavior a bug. You may want to consider using the md_in_html extension. However, note that In fact, the Regardless, you can override/alter the list of block-level tags via an extension. Feel free to create your own third-party extension which adds import markdown
md = markdown.Markdown()
md.block_level_elements.append('html')
html = md.convert(src) Of course, your Markdown content still won't be parsed as Markdown, so that doesn't really help you. Perhaps a better approach would be to use the md_in_html extension and set As there is no bug, I am closing this as wontfix. |
If you meant it like this, with v3.4, it doesn't seem to work:
(Note,
It does works after also setting: md.block_level_elements.append('html') but this then can't be used from the command line.
Wouldn't you add Lines 43 to 44 in e3604b4
Lines 82 to 83 in e3604b4
(These are two separate lists? 🤔) My use case is a simple .md file that compiles directly into the whole HTML page, circumventing the need for a separate templating engine. |
I am curious if there is a reason to not just specify |
The reason is as I stated earlier...
Truth be told, I didn't remember that the On the other hand, I agree that
Yes, the old list was left at |
Since v3.3 (more precisely, #803 / b701c34), converting the following test document bug-test.txt:
by running e.g.
results in
Prior to v3.3, the result was as expected:
Does the new HTML parser added in #803 perhaps not account for
<html>
HTML tag?The text was updated successfully, but these errors were encountered: