-
Notifications
You must be signed in to change notification settings - Fork 332
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
Line breaks between list items are not parsed correctly #214
Comments
@johnxnguyen @rob-keepsafe any thoughts? |
Hi @ealymbaev sorry for the delay. Indeed this is the behavior of Note however that two list items are separated by double newlines, then they both belong to separate lists:
Does this help? |
Hi @johnxnguyen here is the quote from
As you may see, list items separated by blank line are parsed differently (wrapped with paragraph). But P.S. I do not need to separate them into different lists, I need both items in the same list, but I need to know if they have (or don't have) blank line between them in source markdown. |
Here is an example showing how Github renders these cases.
renders into: First Example
Second Example
|
Sorry, I misread the issue! I think I understand now what's the difference between the two rendered examples. Playing with this example I see that the tree has the same node structure regardless of whether there is a newline between the list items. Both list items contain a paragraph node (just as the output of Down shows). However, there is a So the issue isn't about It leads me to think that this I'd need to dig a little deeper to check if |
Yes, that was exactly what I was talking about. It would be great if you could add additional property to I don't know if it would help, but I have found Here is the link to |
Hey @ealymbaev , you're right, the |
@johnxnguyen actually I am using my own visitor, but it has its own So it would be enough to have this property in |
I have tested your pull request and it works!
Thank you for the feature! |
When are you planning to release new version with this feature? |
@ealymbaev I'll release once the PR merges Also I've given you collaborator access so you can feel free to open PRs and help improve Down in the future Thanks for raising the issue and digging into the docs |
Please help prevent duplicate issues before submitting a new one:
Report
What did you do?
I am trying to parse the following markdown example:
What did you expect to happen?
Most markdown renderers (e.g.
Github
) insert a line break between list items inSecond Example
.What happened instead?
But
Down
library does parse both first and second example same way. Here is the output ofDebugVisitor
:I do understand that you use
cmark
library for parsing markdown nodes, but maybe I am missing something? Maybe some configuration options?Or should I report this issue to
cmark
library repo?The text was updated successfully, but these errors were encountered: