Marked: Markdown parser acting funky with raw html

Created on 29 Oct 2018  路  7Comments  路  Source: markedjs/marked

Since I see that the markdown renderer is referenced within Panini, I decided to open the issue here, but feel free to tell me I'm wrong here.

I have a markdown file. I went from doing an <h2> as ## to using raw html. IE, I went from this:

##Our Rules
Effective: April 2, 2015

To:

<h2>Our Rules</h2>
Effective: April 2, 2015

The very strange thing here is that, when there's no line break in the raw <html>, the 2nd option, the markdown doesn't render! Anything subsequent render as a string literal and not as the intended markdown -> tag.

simply adding a line break between <h2>Our Rules</h2> and Effective: April 2, 2015 fixed it. As so:

<h2>Our Rules</h2>

Effective: April 2, 2015
question

All 7 comments

Try adding a space after the hash.

## Our Rules
Effective: April 2, 2015

Our Rules

Effective: April 2, 2015

That didn't change anything @styfle !

It works fine on the demo page

Could it be because Panini is using ^0.3.14 our latest version is 0.5.1

Was that a specific issue within ^0.3.14 @UziTech ?

Not sure, but as @styfle showed it seems to work with the latest version.

I confirmed that adding a space works from version 0.3.14 all the way to the latest version.

https://jsbin.com/feculaqota/edit?html,output

I don't believe this is an issue with marked.

The bug is likely in panini.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gclove picture gclove  路  4Comments

camwiegert picture camwiegert  路  4Comments

cusalvi picture cusalvi  路  3Comments

thyxsl picture thyxsl  路  4Comments

vsemozhetbyt picture vsemozhetbyt  路  4Comments