mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Fix ProseMirror failing to parse Markdown images
This commit is contained in:
parent
636c9b35c0
commit
9aa5fc4420
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ export const writeAsMarkdownParser = new MarkdownParser(
|
|||
getAttrs: (tok) => ({
|
||||
src: tok.attrGet("src"),
|
||||
title: tok.attrGet("title") || null,
|
||||
alt: tok.children?.[0].content || null,
|
||||
alt: (tok.children !== null && typeof tok.children[0] !== 'undefined' ? tok.children[0].content : null),
|
||||
}),
|
||||
},
|
||||
hardbreak: { node: "hard_break" },
|
||||
|
|
Loading…
Reference in a new issue