Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 8293aa3

Browse files
committed
Merge branch '618-bug-create-from-template-inputs-tag-before-template-frontmatter'
2 parents 8f1e775 + 893de71 commit 8293aa3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/services/FileManagerService.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ class VaultManager {
2626
);
2727
let content = databasefields ? parseFrontmatterFieldsToString(databasefields, localSettings).concat("\n").concat(parseInlineFieldsToString(databasefields)) : "";
2828

29-
// Custom content by source
30-
switch (localSettings.source_data) {
31-
case SourceDataTypes.TAG:
32-
content = content.concat(`#${localSettings.source_form_result}\n`);
33-
break;
34-
default:
35-
}
36-
3729
// Obtain content from current row template
3830
try {
3931
if (DataviewService.isTruthy(localSettings.current_row_template) && localSettings.current_row_template.endsWith(".md")) {
@@ -44,6 +36,15 @@ class VaultManager {
4436
} catch (err) {
4537
new Notice(`Error while inserting ${localSettings.current_row_template}: ${err}`);
4638
}
39+
40+
// Custom content by source
41+
switch (localSettings.source_data) {
42+
case SourceDataTypes.TAG:
43+
content = content.concat(`#${localSettings.source_form_result}\n`);
44+
break;
45+
default:
46+
}
47+
4748
await app.vault.modify(created_note, content ?? "");
4849
LOGGER.debug(`<= create_markdown_file`);
4950
return created_note;

0 commit comments

Comments
 (0)