File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ require('render-markdown').setup({
55
55
56
56
(fenced_code_block) @code
57
57
58
- (list_item) @item
58
+ (list_marker_plus) @list_marker
59
+ (list_marker_minus) @list_marker
60
+ (list_marker_star) @list_marker
59
61
60
62
(pipe_table_header) @table_head
61
63
(pipe_table_delimiter_row) @table_delim
Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ function M.setup(opts)
41
41
42
42
(fenced_code_block) @code
43
43
44
- (list_item) @item
44
+ (list_marker_plus) @list_marker
45
+ (list_marker_minus) @list_marker
46
+ (list_marker_star) @list_marker
45
47
46
48
(pipe_table_header) @table_head
47
49
(pipe_table_delimiter_row) @table_delim
@@ -168,8 +170,8 @@ M.handle_markdown = function(tree)
168
170
hl_group = highlights .code ,
169
171
hl_eol = true ,
170
172
})
171
- elseif capture == ' item ' then
172
- -- List items from tree-sitter should have leading spaces removed, however there are known
173
+ elseif capture == ' list_marker ' then
174
+ -- List markers from tree-sitter should have leading spaces removed, however there are known
173
175
-- edge cases in the parser: https://github.com/tree-sitter-grammars/tree-sitter-markdown/issues/127
174
176
-- As a result we handle leading spaces here, can remove if this gets fixed upstream
175
177
local _ , leading_spaces = value :find (' ^%s*' )
You can’t perform that action at this time.
0 commit comments