[SOLVED] Empty <p> before and after plain html in markdown files

Hi all,

my markdown file with

<h2 class="sectionhead">Header 2</h2>
<h3 class="teaser-head">Header 3</h3>

renders as

<p></p>
<h2 class="sectionhead">Header 2</h2>
<h3 class="teaser-head">Header 3</h3>
<p></p>

See the empty paragraph elements?
If i write

## Header 2
### Header 3

it renders perfect without empty elemts. I’ve searched the forum but only found solved issues around shortcodes. So, any ideas what’s going wrong here? Is this a know bug?

I need plain html in *.md for classes and ids

Thanks

1 Like

My bad, block level elements must be surrounded by blank lines :frowning:

https://daringfireball.net/projects/markdown/syntax#header

3 Likes

Thanks for posting this

Thanks a lot! For anyone reading this: do not write something like:

What a great video:
{{< youtube "BLAHBLAH" >}}
You'll love it!

but, rather, insert a blank like before and after the shortcode:

What a great video:

{{< youtube "BLAHBLAH" >}}

You'll love it!
1 Like