fix: 兼容Obsidian frontmatter换行
This commit is contained in:
parent
daaabf07fc
commit
7324ce5bae
@ -368,7 +368,7 @@ function stripYamlQuotes(value: string): string {
|
||||
* @returns Frontmatter fields as scalar strings or string arrays.
|
||||
*/
|
||||
function parseFrontmatterFields(content: string): Map<string, string | string[]> {
|
||||
const frontmatter = content.match(/^---\n([\s\S]*?)\n---/);
|
||||
const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
||||
const fields = new Map<string, string | string[]>();
|
||||
if (!frontmatter?.[1]) return fields;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user