Markdown Extra - HTML <a>-block?

I am currently trying to solve an issue I have with some markdown HTML.
What I try to achieve is a -block. The code I want to use in the markdown file is as follow:

<a href="#" markdown="1"><div class="left">
## Title 1
![Description](test.png)
</div></a>

Now the problem is that the output of this is really unusable:

<p><a href="#" markdown="1"><div class="left"></p>
<h2>Title 1</h2>
<p><img alt="Description" src="/path/grav-admin/user/pages/03.de/01.home/_home1/test.png" />
</div></a></p>

I tried also other variants using without

, but the output is also bad.

How can I get clean code?

Try to put the within the

:slight_smile:

The result is even worse then:

— html

Title 1

Description

---

what if you try this?

<a href="#"><div class="left" markdown="1">
## Title 1
![Description](test.png)
</div></a>
---

This seems to be the best solution, as I get only one

block which isn’t that much in the way (I hope at least).

— html

Title 1

Description

---

EDIT:
My answer above is wrong, as I didn’t see that the link will appear 2x.

— html

Title 1

Description

``` So I can also not use this solution...

Any other ideas?

Hello,
Could you use a span instead of a div ?

Sorry, I hadn’t seen the h2 wich is also a block element…

I created an issue for this: https://github.com/getgrav/grav-plugin-admin/issues/1126

Also I’m considering using Twig instead of markdown for this specific case. I noticed you can choose.

This is really a limitation of Markdown Extra. it’s not very well supported and doesn’t get updated often (last commit was 2 years ago - https://github.com/erusev/parsedown-extra), so i suggest not using markdown inside HTML, better to just use pure HTML with some Twig if you want to get the output you desire.