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

Code blocks adding stray \n #6

Open
xarvh opened this issue May 15, 2019 · 2 comments
Open

Code blocks adding stray \n #6

xarvh opened this issue May 15, 2019 · 2 comments

Comments

@xarvh
Copy link

xarvh commented May 15, 2019

First and foremost, thank you for writing this library, it's awesome!

Code blocks add a newline even if it does not exist in the input string.
Is this intended?

From elm repl:

> Markdown.Block.parse Nothing "    return"
[CodeBlock Indented "return\n"]

This is a problem for our product because we need to parse and unparse the code often, and every cycle adds more and more \n to the markdown.

@pablohirafuji
Copy link
Owner

pablohirafuji commented May 19, 2019

Thanks for the feedback!

I understand that this is a problem, but I tried to follow the commonmark spec and it seems that this is how it should behave (I found an open issue about this).

Let me know if I have missed something.

@xarvh
Copy link
Author

xarvh commented May 20, 2019

I understand, thanks.
For the time being, we'll use a work around.

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

2 participants