Skip to content

Commit

Permalink
Fix overwriting frontmatter from template
Browse files Browse the repository at this point in the history
Fixes #494.
  • Loading branch information
epwalsh committed Mar 18, 2024
1 parent 450c3da commit 4e80ab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Don't open picker for tags when there aren't any matches.
- Fixed overwriting frontmatter when creating daily note with template.

## [v3.7.3](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.7.3) - 2024-03-13

Expand Down
3 changes: 3 additions & 0 deletions lua/obsidian/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,9 @@ Client.write_note = function(self, note, opts)
verb = "Created"
if opts.template ~= nil then
require("obsidian.templates").clone_template(opts.template, path, self, note.title or note:display_name())

-- Reload note.
note = Note.from_file(path)
end
end

Expand Down

0 comments on commit 4e80ab4

Please sign in to comment.