Skip to content

Commit

Permalink
fix: template content being overridden when using `app.fileManager.pr…
Browse files Browse the repository at this point in the history
…ocessFrontMatter` on blank files

refs: #1309
  • Loading branch information
Zachatoo committed May 5, 2024
1 parent 678d075 commit cdc8815
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/Templater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export class Templater {
const doc = editor.getDoc();
const oldSelections = doc.listSelections();
doc.replaceSelection(output_content);
await app.vault.modify(active_editor.file, editor.getValue());

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

0 comments on commit cdc8815

Please sign in to comment.