Marked: Bug in parsing of headers

Created on 20 Mar 2016  路  4Comments  路  Source: markedjs/marked

Hi!

I have such a markdown:

#h1

####### h2

Calling of marked.lexer returns such tokens

{ type: 'paragraph', text: '#h1' }
{ type: 'paragraph', text: '####### h2' }

But github displays h1 and h2 as headings, not as paragraph.

This case works fine in 0.3.3 and is broken since 0.3.4.

Thank you!

Most helpful comment

having the same issue in 0.3.6

All 4 comments

having the same issue in 0.3.6

See #981

Only up to 6 hashes are allowed for headings, so ####### h2 is not valid.
You always need space between the # and the text.

Surprised I didn't catch the no space part of this...I did with the hashtag submission though; so, at least I'm not completely slacking. ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thyxsl picture thyxsl  路  4Comments

camwiegert picture camwiegert  路  4Comments

samit4me picture samit4me  路  3Comments

UziTech picture UziTech  路  4Comments

learykara picture learykara  路  3Comments