Skip to content

Commit

Permalink
feat: add blank lines between tangled blocks
Browse files Browse the repository at this point in the history
Resolves nvim-neorg#955.
  • Loading branch information
rileyshahar committed Jun 21, 2023
1 parent 6fece15 commit 7f196f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/neorg/modules/core/tangle/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,13 @@ module.public = {
end

if file_to_tangle_to then
tangles[file_to_tangle_to] = tangles[file_to_tangle_to] or {}
if tangles[file_to_tangle_to] then
-- insert a blank line between blocks
table.insert(content, 1, "")
else
tangles[file_to_tangle_to] = {}
end

vim.list_extend(tangles[file_to_tangle_to], content)
end

Expand Down

0 comments on commit 7f196f8

Please sign in to comment.