mirror of
https://github.com/writeas/writefreely
synced 2025-01-21 18:45:37 +01:00
Fix ProseMirror failing to parse Markdown images
This commit is contained in:
parent
636c9b35c0
commit
9aa5fc4420
@ -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 New Issue
Block a user