diff --git a/docs/index.js b/docs/index.js index fceecda..f69349a 100644 --- a/docs/index.js +++ b/docs/index.js @@ -414,16 +414,4 @@ quill2.setContents([ { insert: '25' }, { attributes: { 'table-up-cell-inner': { tableId: '8v36875pbr6', rowId: 'fow0uajprzw', colId: 'y0epsy6odnm', rowspan: 1, colspan: 1 } }, insert: '\n' }, { insert: '\n' }, - - // TODO: balance table loop - // { insert: '\n' }, - // { insert: { 'table-up-col': { full: false, width: 583 } } }, - // { insert: { 'table-up-col': { full: false, width: 583 } } }, - // { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' }, - // { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' }, - // { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' }, - // { insert: 'blockquote' }, - // { attributes: { 'blockquote': true, 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n\n' }, - // { attributes: { 'table-up-cell-inner': { rowspan: 1, colspan: 1 } }, insert: '\n' }, - // { insert: '\n' }, ]); diff --git a/src/formats/table-col-format.ts b/src/formats/table-col-format.ts index 27322b7..4025060 100644 --- a/src/formats/table-col-format.ts +++ b/src/formats/table-col-format.ts @@ -122,6 +122,10 @@ export class TableColFormat extends BlockEmbed { const tableColgroup = findParentBlot(this, blotName.tableColgroup); tableColgroup.align = this.align; + if (this.next != null && this.checkMerge()) { + this.next.remove(); + } + super.optimize(context); }