Closed antistic closed 2 years ago
text 1 --- text 2 --- text 3
does
paragraph [0, 0] - [1, 0] thematic_break [2, 0] - [3, 0] paragraph [4, 0] - [5, 0] document [4, 0] - [4, 6] flow_node [4, 0] - [4, 6] plain_scalar [4, 0] - [4, 6] string_scalar [4, 0] - [4, 6] thematic_break [6, 0] - [7, 0] paragraph [8, 0] - [9, 0]
when I would have expected
paragraph [0, 0] - [1, 0] thematic_break [2, 0] - [3, 0] paragraph [4, 0] - [5, 0] thematic_break [6, 0] - [7, 0] paragraph [8, 0] - [9, 0]
A smaller example would be
a *** b ***
paragraph [0, 0] - [1, 0] thematic_break [1, 0] - [2, 0] paragraph [2, 0] - [3, 0] document [2, 0] - [2, 1] flow_node [2, 0] - [2, 1] plain_scalar [2, 0] - [2, 1] string_scalar [2, 0] - [2, 1] thematic_break [3, 0] - [4, 0]
instead of
paragraph [0, 0] - [1, 0] thematic_break [1, 0] - [2, 0] paragraph [2, 0] - [3, 0] thematic_break [3, 0] - [4, 0]
a *** b
works as expected — it's the second break that changes it
The content between the thematic breaks is interpreted as a yaml block. This should be fixed by this PR I just made: https://github.com/nvim-treesitter/nvim-treesitter/pull/2501
Thanks so much, it works now!
does
when I would have expected
A smaller example would be
instead of
works as expected — it's the second break that changes it