From 16add6b40feb9bedf5aacbfc107f4c485729cf6c Mon Sep 17 00:00:00 2001 From: alfiehub Date: Wed, 15 Nov 2023 19:05:50 +0100 Subject: [PATCH] fix: journal toc reset month & indent --- lua/neorg/modules/core/journal/module.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/neorg/modules/core/journal/module.lua b/lua/neorg/modules/core/journal/module.lua index 379ba579f..377580187 100644 --- a/lua/neorg/modules/core/journal/module.lua +++ b/lua/neorg/modules/core/journal/module.lua @@ -46,6 +46,8 @@ module.examples = { -- Don't print the year if it hasn't changed if not current_year or current_year < entry[1] then current_year = entry[1] + current_month = nil + current_quarter = nil table.insert(output, "* " .. current_year) end @@ -73,7 +75,7 @@ module.examples = { end -- Prints the file link - table.insert(output, entry[4] .. string.format("[%s]", entry[5])) + table.insert(output, " " .. entry[4] .. string.format("[%s]", entry[5])) end return output @@ -348,6 +350,7 @@ module.private = { -- Don't print the year and month if they haven't changed if not current_year or current_year < entry[1] then current_year = entry[1] + current_month = nil table.insert(output, "* " .. current_year) end if not current_month or current_month < entry[2] then @@ -356,7 +359,7 @@ module.private = { end -- Prints the file link - table.insert(output, entry[4] .. string.format("[%s]", entry[5])) + table.insert(output, " " .. entry[4] .. string.format("[%s]", entry[5])) end return output