diff --git a/src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts b/src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts index 3b332bbd..09e9c793 100644 --- a/src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts +++ b/src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts @@ -64,6 +64,10 @@ export const BaseSchemaSpecs: ExtensionAuto = (builder, }, fromMd: {tokenSpec: {name: BaseNode.Paragraph, type: 'block'}}, toMd: (state, node, parent) => { + /* + An empty line is added only if there is some content in the parent element. + This is necessary in order to prevent an empty document with empty lines + */ if (opts.preserveEmptyRows && !node.content.size) { let isParentEmpty = true;