mirror of
https://github.com/antokeinanen/obsidian-advanced-merger.git
synced 2026-07-22 07:40:24 +00:00
fix issue where the created file will still be collected and merged
This commit is contained in:
parent
411a7bd00b
commit
7a6f9e67fd
1 changed files with 5 additions and 5 deletions
10
main.ts
10
main.ts
|
|
@ -12,11 +12,6 @@ export default class AdvancedMerge extends Plugin {
|
|||
.onClick(async () => {
|
||||
const { vault } = this.app;
|
||||
|
||||
const destination = await vault.create(
|
||||
`${folder.path}-merged.md`,
|
||||
""
|
||||
);
|
||||
|
||||
const files = vault
|
||||
.getMarkdownFiles()
|
||||
.filter(
|
||||
|
|
@ -35,6 +30,11 @@ export default class AdvancedMerge extends Plugin {
|
|||
return 0;
|
||||
});
|
||||
|
||||
const destination = await vault.create(
|
||||
`${folder.path}-merged.md`,
|
||||
""
|
||||
);
|
||||
|
||||
files.forEach(async (file) => {
|
||||
let contents = await vault.read(file);
|
||||
contents = `\n# ${file.name.replace(
|
||||
|
|
|
|||
Loading…
Reference in a new issue