tree-sitter-markdown
tree-sitter-markdown copied to clipboard
Nested list item with 4 indents is concealed unexpectedly
Describe the bug First of all, thanks for working on this amazing parser!
After the recent update, the list_marker
of the first nested list item with 4 spaces is concealed to nothing (``) while the following nested list items are concealed as expected.
Please refer to below example.
Code example
- a list item with 4 spaces
- first nested list item <-- the `list_marker_minus` is concealed to blank
- second nested list item <-- conceal works fine
- third & more list items <-- conceal works fine
- a list item with 2 spaces
- first nested list item <-- works fine
- more items <-- works fine
Expected behavior
List item marker (-,+,*
) should be concealed regardless of the tab size (2 or 4)
Apologies, this is an issue with nvim-treesitter
, see this issue
Ah-ha! Didn't notice there was an existing issue. Thank you! :)
That commit has been reverted; nevertheless, the original cause is due to the parser capturing inconsistent (item number dependent) whitespace around the marker. If this can be fixed, we can re-enable those conceals. (If not, this issue can be closed.) @MDeiml
So the first list item captures more whitespace (before the marker) than the following ones? Gonna check that out when I have time.
The second does; see the the screenshot from the linked issue: