Generate of Links breaks when wrapped by <div>

MrC's Avatar

MrC

26 Sep, 2022 06:52 PM

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]
  1. Support Staff 1 Posted by Brett on 26 Sep, 2022 08:15 PM

    Brett's Avatar

    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. 2 Posted by MrC on 26 Sep, 2022 08:50 PM

    MrC's Avatar

    I have all three of those criteria. Are you able to replicate using the same and my doc above?

  3. Support Staff 3 Posted by Brett on 26 Sep, 2022 09:16 PM

    Brett's Avatar

    Oh, I see, that's a weird quirk in MultiMarkdown, apparently. Easily worked around by using anchors instead of reference links:

    * link to [Header2a](#h2alink)
    * link to [Header2b](#h2blink)
    
  4. 4 Posted by MrC on 26 Sep, 2022 10:20 PM

    MrC's Avatar

    Bingo!

    Thank you for the quick replies and solution.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • sample.png 178 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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