From 147f44474859ad510bd105e63eaa33bb204058c7 Mon Sep 17 00:00:00 2001 From: Chris Bednarz <3231783+crbednarz@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:16:43 -0700 Subject: [PATCH] Fixed issue where notes created from templates would error if _ was previously set. (closes #231) --- lua/telekasten.lua | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index 0f250b6..bdea19a 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -1334,7 +1334,12 @@ local function FindDailyNotes(opts) or M.Cfg.dailies_create_nonexisting == true ) then - create_note_from_template(today, _, fname, M.note_type_templates.daily) + create_note_from_template( + today, + nil, + fname, + M.note_type_templates.daily + ) opts.erase = true opts.erase_file = fname end @@ -1384,7 +1389,12 @@ local function FindWeeklyNotes(opts) or M.Cfg.weeklies_create_nonexisting == true ) then - create_note_from_template(title, _, fname, M.note_type_templates.weekly) + create_note_from_template( + title, + nil, + fname, + M.note_type_templates.weekly + ) opts.erase = true opts.erase_file = fname end @@ -1760,7 +1770,7 @@ local function GotoDate(opts) then create_note_from_template( word, - _, + nil, fname, M.note_type_templates.daily, opts.dates @@ -2612,7 +2622,12 @@ local function GotoThisWeek(opts) or M.Cfg.weeklies_create_nonexisting == true ) then - create_note_from_template(title, _, fname, M.note_type_templates.weekly) + create_note_from_template( + title, + nil, + fname, + M.note_type_templates.weekly + ) opts.erase = true opts.erase_file = fname end