Skip to content

Commit ac94763

Browse files
Fixed wrong committed file
1 parent 7a30898 commit ac94763

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lua/render-markdown/integ/source.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function M.list_prefix(row, node)
2626
return '' -- Don't run if on the same line, entry should already have a list marker.
2727
end
2828

29+
local marker_row = select(1, marker:range())
2930
-- Retrieve the line from the buffer
3031
local marker_line = vim.api.nvim_buf_get_lines(0, marker_row, marker_row + 1, false)[1]
3132

@@ -68,13 +69,12 @@ function M.items(buf, row, col)
6869
table.insert(items, M.item(component.raw, component.rendered, nil))
6970
end
7071
elseif node:type() == 'list_item' or vim.tbl_contains(list_markers, node:type()) then
71-
local last_marker = M.list_prefix(row, node)
72-
print(last_marker)
72+
local list_prefix = M.list_prefix(row, node)
7373
local checkbox = config.checkbox
74-
table.insert(items, M.item(last_marker .. '[ ] ', checkbox.unchecked.icon, 'unchecked'))
75-
table.insert(items, M.item(last_marker .. '[x] ', checkbox.checked.icon, 'checked'))
74+
table.insert(items, M.item(list_prefix .. '[ ] ', checkbox.unchecked.icon, 'unchecked'))
75+
table.insert(items, M.item(list_prefix .. '[x] ', checkbox.checked.icon, 'checked'))
7676
for name, component in pairs(checkbox.custom) do
77-
table.insert(items, M.item(component.raw, component.rendered, name))
77+
table.insert(items, M.item(list_prefix .. component.raw .. ' ', component.rendered, name))
7878
end
7979
end
8080
return items

0 commit comments

Comments
 (0)