Skip to content

Commit

Permalink
feat: add blank lines between tangled blocks (#958)
Browse files Browse the repository at this point in the history
Resolves #955
  • Loading branch information
rileyshahar authored Aug 1, 2023
1 parent 5dc38a7 commit 1c41592
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 @@ -277,7 +277,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 1c41592

Please sign in to comment.