Skip to content

Commit

Permalink
fix node:child(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
laher committed Jul 8, 2023
1 parent 3b68084 commit 3748ecc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lua/neorg/modules/core/summary/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,13 @@ module.private = {
local ranged_tag = node:parent()
for child in ranged_tag:iter_children() do
if child:type() == "tag_parameters" then
local _, param = child:iter_children()
local text = module.required["core.integrations.treesitter"].get_node_text(param)
if text == "summary" then
return ranged_tag
local param = child:child(0)
if param ~= nil then
--for param in child:iter_children() do
local text = module.required["core.integrations.treesitter"].get_node_text(param)
if text == "summary" then
return ranged_tag
end
end
end
end
Expand Down

0 comments on commit 3748ecc

Please sign in to comment.