Generate of Links breaks when wrapped by <div>
Today I tried wrapping some MD with an HTML <div>
, to style an entire block of content. To my surprise, it breaks subsequent generation of any links wrapped by the <div>
.
# Header1
<div class="h2a">
## Header2a [h2alink]
Lorem ipsum dolor ...
</div>
## Header2b [h2blink]
Lorem ipsum dolor ...
* link to [Header2a][h2alink]
* link to [Header2b][h2blink]
- sample.png 178 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 26 Sep, 2022 08:15 PM
To mix HTML and Markdown, you need to do a few things:
1. Make sure there's a blank line around the <div> tags
2. Use the MultiMarkdown processor (Preferences->Processor)
3. Enable "Process Markdown inside of HTML" in Preferences->Processor
2 Posted by MrC on 26 Sep, 2022 08:50 PM
I have all three of those criteria. Are you able to replicate using the same and my doc above?
Support Staff 3 Posted by Brett on 26 Sep, 2022 09:16 PM
Oh, I see, that's a weird quirk in MultiMarkdown, apparently. Easily worked around by using anchors instead of reference links:
4 Posted by MrC on 26 Sep, 2022 10:20 PM
Bingo!
Thank you for the quick replies and solution.