From 1c41592ec975189c79987aa32228778c111eb67f Mon Sep 17 00:00:00 2001 From: Riley Shahar Date: Tue, 1 Aug 2023 11:27:16 -0700 Subject: [PATCH] feat: add blank lines between tangled blocks (#958) Resolves https://github.com/nvim-neorg/neorg/issues/955 --- lua/neorg/modules/core/tangle/module.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/neorg/modules/core/tangle/module.lua b/lua/neorg/modules/core/tangle/module.lua index f94f43268..f5f297588 100644 --- a/lua/neorg/modules/core/tangle/module.lua +++ b/lua/neorg/modules/core/tangle/module.lua @@ -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