Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another bug in parsing of headers #526

Closed
eGavr opened this issue Dec 11, 2014 · 3 comments
Closed

Another bug in parsing of headers #526

eGavr opened this issue Dec 11, 2014 · 3 comments
Labels
category: headings L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue parser: CommonMark

Comments

@eGavr
Copy link

eGavr commented Dec 11, 2014

I have such md-file

# ##

I've received the tokens of the given markdown by method marked.lexer:

[ { type: 'heading', depth: 1, text: '#' }, links: {} ]

But the given markdown does not have any headers.

@joshbruce
Copy link
Member

See #981

@joshbruce
Copy link
Member

See Commonmark observation from @Feder1co5oave in #981

@joshbruce joshbruce added L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue category: headings parser: CommonMark labels Jan 10, 2018
@calculuschild
Copy link
Contributor

calculuschild commented May 27, 2021

Commonmark Example 49 seems to indicate that emitting an empty header is the correct behavior, and Example 42 tells us that the number of opening and closing # do not need to match.

Our tests pass both of these Commonmark cases, and the OP's example correctly emits an empty header.

@UziTech I think can we close this?

@UziTech UziTech closed this as completed May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: headings L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue parser: CommonMark
Projects
None yet
Development

No branches or pull requests

4 participants