Markdown > HTML: How to keep fenced DIVs from receiving heading classes? #9966
-
|
This Markdown source: will be converted to: So I get HTML sections with the H1 class(es) and ID added, which is not what I want. I tried adding How could I get Thank you. Edit: I found that adding a paragraph (even with a single character) right after the fenced DIV marker will give the desired result, but I would still like to know if it can be achieved with a head1 right after the fenced DIV marker. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Using an (possibly empty) HTML comment before the first header should give the desired result: ::: {.class1}
<!-- -->
# Hello world {.class2}
## Hello again {.class3}
::: |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! So, just for context – this is not considered a bug, but intended functionality? Because I understand when elements will inherit rules, but it gets a bit confusing when they are added to their parents (and as I said, |
Beta Was this translation helpful? Give feedback.
Using an (possibly empty) HTML comment before the first header should give the desired result:
::: {.class1} <!-- --> # Hello world {.class2} ## Hello again {.class3} :::