Open Carreau opened 2 years ago
Sorry for the late reply, yeah, this is on my todos https://github.com/stsewd/tree-sitter-rst#todo, the main thing I had problems with was that lists are kind of a special block element, all other block elements are separated by a blank line, but lists can continue after a blank line, and they also can start a new list if the bullet is different, like
* one
* two
- three
Those are two lists! But I could try to solve the first problem at least, for the second I'll need to give each bullet its own node probably
Ah sorry I missed the todo. And good point for the different bullet.
Currently I just have an extra pass, that combine successive identical lists, so that's fine. When I find some time to learn tree-sitter, I can give a shot at fixing it.
It looks like tree-sitter-rst is a bit greedy in deciding to construct a new Enumerated/Bullet list. I think allowing to add blank lines between items would be good.
I think that for my project I can locally fix it is two consecutive nodes are of the same list type, merge them.
as for other issues, I'm happy to take a shot at it, but I might need pointers.