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

Commit 75f9815

Browse files
committed
edit engine
1 parent d500ce5 commit 75f9815

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/helpers/VaultManagement.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,13 @@ export async function updateRowFile(file: TFile, columnId: string, newValue: Lit
231231
}
232232

233233
async function persistFrontmatter(deletedColumn?: string): Promise<void> {
234-
console.log('persistFrontmatter');
235234
const frontmatterGroupRegex = contentHasFrontmatter ? /^---[\s\S]+?---\n/g : /(^[\s\S]*$)/g;
236235
const frontmatterFieldsText = parseFrontmatterFieldsToString(rowFields, ddbbConfig, deletedColumn);
237236
const noteObject = {
238237
action: 'replace',
239238
file: file,
240239
regexp: frontmatterGroupRegex,
241-
newValue: contentHasFrontmatter ? `${frontmatterFieldsText}` : `${frontmatterFieldsText}\n$1`,
240+
newValue: contentHasFrontmatter ? `${frontmatterFieldsText}` : `${frontmatterFieldsText}$1`,
242241
};
243242
await VaultManagerDB.editNoteContent(noteObject);
244243
}

src/parsers/RowDatabaseFieldsToFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const parseFrontmatterFieldsToString = (databaseFields: RowDatabaseFields
1212
}
1313
});
1414
if (array.length > 0) {
15-
array = [`---`, ...array, `---`];
15+
array = [`---`, ...array, `---\n`];
1616
}
1717
return array.join('\n');
1818
}

0 commit comments

Comments
 (0)