-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Double empty lines between headers and list #54
Comments
This is actually true for all headings, on top of any element. json2md([{ "h2": "Title" }, { "p": "Paragraph" }])
// '## Title\n\n\nParagraph\n' |
I think ideal solution should be that nobody adds newlines except on final step: |
Probably, yeah. To be honest, I have resorted to applying |
Interesting aproach :-) Although it could be better if we can have it clean beforehand :-D |
I'm having an issue with this as well, except that I need to be able to add multiple "blocks" as single lines and I don't want the extra lines between them. I would have used To me, ideally, each converter would define its own formatting including any trailing new lines. Then, the final step would be just |
When setting a list just after a header, there are two empty lines between them, separating them too much, when there should be just a single one. Seems it's due to the fact headers add an newline after them and lists add a newline before them, so when joining the fragments this result in three consecutive newlines. I think it would be better no block add a newline before or after them, and instead the joining add the two ones to create the empty line. This failing test checks it:
The text was updated successfully, but these errors were encountered: