Skip to content

Markdown in HTML renders in snippets when used within tabs, but not in normal markdown. Why? #2188

Answered by facelessuser
Andre601 asked this question in Q&A
Discussion options

You must be logged in to vote

This has to do with how Python Markdown, not Tabs parses Markdown.

Generally, Python Markdown requires block tags (like <div>) to have the start and end on different lines, but this will not automatically parse the HTML content as Markdown.

<div>
**content**
</div>

To parse the content as Markdown, you need to use the md_in_html extension and apply the markdown attribute:

<div markdown>
**content**
</div>

While the Python Markdown documentation does not explain this well, these cases are meant for root-level HTML. This can cause inconsistencies when we are using HTML that is not at the root level; for instance, in indented constructs.

When we use this under indented constructs it appears …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@facelessuser
Comment options

Answer selected by facelessuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants