Skip to content

Commit

Permalink
feat: support multi-line values in metagen (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored Jul 16, 2024
1 parent e6f2246 commit 321c435
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ module.public = {
-- override with data from metadata table
data = { data[1], metadata[data[1]] }
end
table.insert(
result,
whitespace .. data[1] .. delimiter .. tostring(type(data[2]) == "function" and data[2]() or data[2])
)
local lines = whitespace .. data[1] .. delimiter .. tostring(type(data[2]) == "function" and data[2]() or data[2])
for line in ipairs(vim.split(lines, "\n")) do
table.insert(result, line)
end
end

table.insert(result, "@end")
Expand Down

0 comments on commit 321c435

Please sign in to comment.