feat: Allow embeds to be used inside tables (#5315)

This commit is contained in:
Tom Moor
2023-05-07 21:05:54 -04:00
committed by GitHub
parent 738fa55e12
commit a0df79ea5a
8 changed files with 23 additions and 17 deletions

View File

@@ -126,7 +126,9 @@ export default class Embed extends Node {
}
toMarkdown(state: MarkdownSerializerState, node: ProsemirrorNode) {
state.ensureNewLine();
if (!state.inTable) {
state.ensureNewLine();
}
state.write(
"[" +
state.esc(node.attrs.href, false) +
@@ -134,7 +136,9 @@ export default class Embed extends Node {
state.esc(node.attrs.href, false) +
")"
);
state.write("\n\n");
if (!state.inTable) {
state.write("\n\n");
}
}
parseMarkdown() {