fix: markdown parse yaml header bug
This commit is contained in:
parent
e57286de21
commit
c53376a71a
|
|
@ -125,7 +125,8 @@ function getSyncStatus(noteId?: number): SyncStatus {
|
|||
}
|
||||
|
||||
function getMDStatusFromContent(contentRaw: string): MDStatus {
|
||||
const result = contentRaw.match(/^---([\s\S]*)---\n/);
|
||||
contentRaw = contentRaw.replace(/\r\n/g, "\n");
|
||||
const result = contentRaw.match(/^---\n(.*\n)+?---$/gm);
|
||||
const ret: MDStatus = {
|
||||
meta: { version: -1 },
|
||||
content: contentRaw,
|
||||
|
|
|
|||
Loading…
Reference in New Issue