-
Notifications
You must be signed in to change notification settings - Fork 862
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 block handling nested in indented blocks doesn't work properly #1096
Comments
Updated results using the latest released Markdown. |
So, I based the current behavior on the rules, which state:
Of course, the reference implementation does not support admonitions, but nested lists are indented. And according to Babelmark, the reference implementation parses indented raw HTML blocks as raw HTML blocks. In any event, so long as we are parsing raw HTML in a preprocessor, this is what we will get. The parser is very strict about requiring no indentation (even a single space is not allowed). We would need to switch to a blockprocessor, which would strip the indentation in the appropriate cases (when nested) before parsing as raw HTML. In the early commits to the original PR I was using a block processor but reverted to a preprocessor as I was encountering to many obstacles with the way the block parser splits the source on blank lines. |
Ugh, I see this is broken in lists as well. For some reason, I was assuming this to be an Admonition specific issue 😦. And I guess, even before the rewrite this was the behavior of Python Markdown. I guess I just never stumbled on this until now. |
The following example shows that raw HTML that has empty newlines in the content are not handled properly, and are instead treated as incomplete HTML fragments.
Output
The text was updated successfully, but these errors were encountered: