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

Commit a3e40bc

Browse files
committed
more strict frontmatter check
1 parent 9dc0862 commit a3e40bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers/VaultManagement.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const noBreakSpace = /\u00A0/g;
1717
* @returns
1818
*/
1919
function hasFrontmatterKey(data: string): boolean {
20-
const frontmatterRegex = /---\s+([\w\W]+?)\s+---/
20+
const frontmatterRegex = /^---\n+.*---\n/g
2121
return frontmatterRegex.test(data);
2222
}
2323

@@ -114,6 +114,7 @@ export async function updateRowFile(file: TFile, columnId: string, newValue: str
114114
}
115115
rowFields.frontmatter[columnId] = newValue;
116116
await persistFrontmatter();
117+
await inlineRemoveColumn();
117118
}
118119

119120
// Modify key of a column

0 commit comments

Comments
 (0)