Skip to content

Commit

Permalink
fix PR
Browse files Browse the repository at this point in the history
  • Loading branch information
PMAWorks committed Dec 16, 2024
1 parent 533d944 commit b8cf4ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/extensions/base/BaseSchema/BaseSchemaSpecs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export const BaseSchemaSpecs: ExtensionAuto<BaseSchemaSpecsOptions> = (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;

Expand Down

0 comments on commit b8cf4ba

Please sign in to comment.