diff --git a/lua/neorg/modules/core/esupports/metagen/module.lua b/lua/neorg/modules/core/esupports/metagen/module.lua index 9165f67be..c3d8a46b4 100644 --- a/lua/neorg/modules/core/esupports/metagen/module.lua +++ b/lua/neorg/modules/core/esupports/metagen/module.lua @@ -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 @@ -257,7 +257,7 @@ module.public = { end meta_root = meta_tree:root() - end) + end if not meta_root then return @@ -375,4 +375,4 @@ module.events.subscribed = { }, } -return module +return module \ No newline at end of file diff --git a/lua/neorg/modules/core/integrations/treesitter/module.lua b/lua/neorg/modules/core/integrations/treesitter/module.lua index e87361719..1d90a9946 100644 --- a/lua/neorg/modules/core/integrations/treesitter/module.lua +++ b/lua/neorg/modules/core/integrations/treesitter/module.lua @@ -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 @@ -661,7 +661,7 @@ module.public = { ) end end - end) + end return result end, @@ -768,4 +768,4 @@ module.events.subscribed = { }, } -return module +return module \ No newline at end of file