Skip to content

Commit

Permalink
fix(meta): fix treesitter deprecation warning (#1104) (#1130)
Browse files Browse the repository at this point in the history
fixes #1104
  • Loading branch information
benatouba committed Oct 29, 2023
1 parent d1bda3c commit 5205f3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module.public = {

local meta_root = nil

languagetree:for_each_child(function(tree)
for _, tree in pairs(languagetree:children()) do
if tree:lang() ~= "norg_meta" or meta_root then
return
end
Expand All @@ -257,7 +257,7 @@ module.public = {
end

meta_root = meta_tree:root()
end)
end

if not meta_root then
return
Expand Down Expand Up @@ -375,4 +375,4 @@ module.events.subscribed = {
},
}

return module
return module
6 changes: 3 additions & 3 deletions lua/neorg/modules/core/integrations/treesitter/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ module.public = {

local result = {}

languagetree:for_each_child(function(tree)
for _, tree in ipairs(languagetree:children()) do
if tree:lang() ~= "norg_meta" then
return
end
Expand Down Expand Up @@ -661,7 +661,7 @@ module.public = {
)
end
end
end)
end

return result
end,
Expand Down Expand Up @@ -768,4 +768,4 @@ module.events.subscribed = {
},
}

return module
return module

0 comments on commit 5205f3f

Please sign in to comment.