Skip to content
Discussion options

You must be logged in to vote
  1. Code blocks take exactly what you give them and preserve it. This is so you can include HTML in code blocks and show the HTML code, not the browser rendered elements.
  2. If you want to preserve HTML and have the browser rendered HTML elements, you have two choices:
    1. Use raw HTML (as you've already demonstrated).
    2. Use custom fences: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/#custom-fences.

I do not have time to code up a custom solution for you though, but generally, it is possible, though I cannot tell you at this time how complicated it may be. Your best bet may be to use raw HTML if you are not keen on trying to code up a custom fence.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by 25ganesh92
Comment options

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

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