Skip to content

Commit

Permalink
fix: frontmatter updates not persisting when using app.vault.processF…
Browse files Browse the repository at this point in the history
…rontMatter outside of a tp.hooks module

refs: #1245
  • Loading branch information
Zachatoo committed Nov 17, 2023
1 parent 70367bb commit 21aa13e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Templater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ export class Templater {
const doc = editor.getDoc();
const oldSelections = doc.listSelections();
doc.replaceSelection(output_content);
await app.vault.modify(active_editor.file, editor.getValue());
if (active_view) {
await active_view.save();
}

app.workspace.trigger("templater:template-appended", {
view: active_view,
Expand Down

0 comments on commit 21aa13e

Please sign in to comment.