From 5a44d3ffbd3b4fff762f8b2712ab1cfd16cff016 Mon Sep 17 00:00:00 2001 From: Ben Lubas <56943754+benlubas@users.noreply.github.com> Date: Tue, 26 Dec 2023 10:44:42 -0500 Subject: [PATCH] fix: `update-metadata` would fail to work with several parse trees in the document (#1234) fixes https://github.com/nvim-neorg/neorg/issues/1233 --- lua/neorg/modules/core/esupports/metagen/module.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/neorg/modules/core/esupports/metagen/module.lua b/lua/neorg/modules/core/esupports/metagen/module.lua index 1d61af4d8..8ad5fd3fb 100644 --- a/lua/neorg/modules/core/esupports/metagen/module.lua +++ b/lua/neorg/modules/core/esupports/metagen/module.lua @@ -280,16 +280,17 @@ module.public = { for _, tree in pairs(languagetree:children()) do if tree:lang() ~= "norg_meta" or meta_root then - return + goto continue end local meta_tree = tree:parse()[1] if not meta_tree then - return + goto continue end meta_root = meta_tree:root() + ::continue:: end if not meta_root then