jfhr / deltaconvert

Convert quill deltas to and from other formats
https://npmjs.com/package/deltaconvert
Apache License 2.0
0 stars 0 forks source link

close #11 para break formatted #12

Closed jfhr closed 1 year ago

jfhr commented 1 year ago

delta-to-intermediate.js:

// Fix #11: if this block insert ends in newlines, add a newline to the start of the next block
// to make sure there's a paragraph break between the two blocks.
else if (paraIndex === paras.length - 1 && typeof delta.ops[opIndex + 1]?.insert === 'string') {
    delta.ops[opIndex + 1].insert = '\n' + delta.ops[opIndex + 1].insert;
}