Skip to content

Bug in parsing of headers #729

Closed
Closed

Description

@eGavr

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!

Activity

  1. edsadr commented on Nov 10, 2016

    @edsadr

    having the same issue in 0.3.6

  2. joshbruce commented on Dec 25, 2017

    @joshbruce
    Member

    See #981

  3. Feder1co5oave commented on Jan 10, 2018

    @Feder1co5oave
    Contributor

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

  4. joshbruce commented on Jan 10, 2018

    @joshbruce
    Member

    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. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions