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

Are newlines handled correctly? #36

Open
georgbachmann opened this issue Sep 2, 2015 · 2 comments
Open

Are newlines handled correctly? #36

georgbachmann opened this issue Sep 2, 2015 · 2 comments

Comments

@georgbachmann
Copy link

I am not sure if newlines are handled correctly... Would like to know if it really is an issue with the library or if it's just me not knowing enough about markdown.

I have the following input

*italics*
**bold**
***bold italic***

And what I get is

italics bold _bold italic_

instead of:

italics
bold
_bold italic_

What would be the correct behaviour? And could I get my expected behaviour new lines using this library?

Thanks,
Georg

@Jiropole
Copy link

I had the same issue, explored it pretty thoroughly. Might be an issue with the underlying raw parser which appears to be autogenerated C code from another language. Seems like single newlines never bubble up as newline nodes. Two newlines in a row are handled properly as a new paragraph, though.

indragiek/CocoaMarkdown, though in beta, looks promising; based on jgm/cmark CommonMark implementation. Does not build for me though, as of the time of this writing.

@colllin
Copy link

colllin commented Nov 12, 2015

This is common behavior in markdown. Even on github, when parsing a markdown file like Readme.md. Two newlines make a paragraph. Single newlines are collapsed to a single space character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants