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
Inline code block inside a table header is not recognized #757
Comments
@facelessuser I'm sorry to ask, but do you have any ideas? It looks like an issue with the inline highlighting parser. |
@franckl, as this doesn't seem to be reproducible by me, please provide markdown source that you are using to demonstrate the mentioned issue. Also, please provide things such as Python Markdown version, pymdown-extensions version, etc. |
Ideally provide a minimal case (minimum required to reproduce). |
@franckl, I reread, and I think I understand what is going on. Markdown is not supposed to be parsed inside block HTML. Some block HTML is most likely not recognized the same way when it is indented under admonitions causing some inline code to be recognized. In general, it isn't ideal to mix block HTML and Markdown, but there are options to allow you to mix them: https://python-markdown.github.io/extensions/extra/#simple-example. Keep in mind that sometimes the In short, Markdown in inline tags are usually parsed, but not in block without an extension. Additionally, inline tags under block tags won't be parsed as the parser shouldn't usually traverse the content under the block tag unless it is for some reason treated as normal text by the parser. I'd have to look further to understand why your HTML under the admonition is being parsed. Maybe later today when I have time. |
In general, I think block HTML is supposed to have an empty line before it per spec, though some parsers don't require this, but Python Markdown does. Most likely this is the cause of conflicting behavior. |
One last note, if using pymdown-extensions, I'd use https://facelessuser.github.io/pymdown-extensions/extensions/extrarawhtml/ to parse in block HTML to avoid extension conflicts. It will share the same quirks as the previously mentioned solution, because it is essentially the same, but it splits it out from |
Closing as answered. Please re-open if you experience any further issues. Many thanks to @facelessuser! |
Description
Inline code block (
example
) is not recognized when placed inside an html tableHowever, it does work when the table is placed inside a !!!tips (admonition). See screenshots below and code to reproduce.
I am using the latest python/pip/mkdocs/material versions on linux and osx with chrome.
The text was updated successfully, but these errors were encountered: