mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2025-12-31 22:04:24 -05:00
Create subdirs when creating new note
previously it failed with error message
This commit is contained in:
@@ -448,7 +448,13 @@ local function create_note_from_template(
|
||||
end
|
||||
|
||||
-- now write the output file, substituting vars line by line
|
||||
local filedir = title:match("(.*/)") or ""
|
||||
local dir_succeed = check_dir_and_ask(filedir, filedir)
|
||||
if dir_succeed == false then
|
||||
return
|
||||
end
|
||||
local ofile = io.open(filepath, "a")
|
||||
|
||||
for _, line in pairs(lines) do
|
||||
ofile:write(
|
||||
templates.subst_templated_values(
|
||||
|
||||
Reference in New Issue
Block a user