We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54b29fa commit c4a16f0Copy full SHA for c4a16f0
lua/orgmode/treesitter/listitem.lua
@@ -88,6 +88,9 @@ function Listitem:cookie()
88
local content = self.listitem:field('contents')[1]
89
-- The cookie should be the last thing on the line
90
local cookie_node = content:named_child(content:named_child_count() - 1)
91
+ if not cookie_node then
92
+ return nil
93
+ end
94
95
local text = query.get_node_text(cookie_node, 0)
96
if text:match('%[%d*/%d*%]') or text:match('%[%d?%d?%d?%%%]') then
0 commit comments