Fixed issue where notes created from templates would error if _ was previously set. (closes #231)

This commit is contained in:
Chris Bednarz
2023-04-17 13:16:43 -07:00
committed by GitHub
parent 29f80e3abc
commit 147f444748

View File

@@ -1334,7 +1334,12 @@ local function FindDailyNotes(opts)
or M.Cfg.dailies_create_nonexisting == true or M.Cfg.dailies_create_nonexisting == true
) )
then 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 = true
opts.erase_file = fname opts.erase_file = fname
end end
@@ -1384,7 +1389,12 @@ local function FindWeeklyNotes(opts)
or M.Cfg.weeklies_create_nonexisting == true or M.Cfg.weeklies_create_nonexisting == true
) )
then 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 = true
opts.erase_file = fname opts.erase_file = fname
end end
@@ -1760,7 +1770,7 @@ local function GotoDate(opts)
then then
create_note_from_template( create_note_from_template(
word, word,
_, nil,
fname, fname,
M.note_type_templates.daily, M.note_type_templates.daily,
opts.dates opts.dates
@@ -2612,7 +2622,12 @@ local function GotoThisWeek(opts)
or M.Cfg.weeklies_create_nonexisting == true or M.Cfg.weeklies_create_nonexisting == true
) )
then 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 = true
opts.erase_file = fname opts.erase_file = fname
end end