Skip to content

Commit

Permalink
return note
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Mar 18, 2024
1 parent 9b2b85b commit fd9c8ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/obsidian/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ Client.create_note = function(self, opts)

-- Write to disk.
if not opts.no_write then
self:write_note(note, { template = opts.template })
note = self:write_note(note, { template = opts.template })
end

return note
Expand All @@ -1755,6 +1755,8 @@ end
--- - `update_content`: A function to update the contents of the note. This takes a list of lines
--- representing the text to be written excluding frontmatter, and returns the lines that will
--- actually be written (again excluding frontmatter).
---
---@return obsidian.Note
Client.write_note = function(self, note, opts)
local clone_template = require("obsidian.templates").clone_template
opts = opts or {}
Expand Down Expand Up @@ -1786,6 +1788,8 @@ Client.write_note = function(self, note, opts)
}

log.info("%s note '%s' at '%s'", verb, note.id, self:vault_relative_path(note.path) or note.path)

return note
end

--- Write the note to a buffer.
Expand Down

0 comments on commit fd9c8ec

Please sign in to comment.