Skip to content

Commit

Permalink
fix: update-metadata would fail to work with several parse trees in…
Browse files Browse the repository at this point in the history
… the document (#1234)

fixes #1233
  • Loading branch information
benlubas authored Dec 26, 2023
1 parent 69df2dc commit 5a44d3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a44d3f

Please sign in to comment.