Skip to content

Commit 7dd1fb7

Browse files
committed
merge table-support and resolve merge errors as per @dpvc
2 parents 7f7ad6f + 003df73 commit 7dd1fb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mathjax3-ts/output/chtml/Wrappers/mtable.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,18 @@ export class CHTMLmtable extends CHTMLWrapper {
146146
const attributes = this.node.attributes;
147147
const frame = attributes.get('frame') !== 'none';
148148
const lines = frame || attributes.get('columnlines') !== 'none' || attributes.get('rowlines') !== 'none';
149-
const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']);
149+
const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : []);
150150
//
151151
// Pad the rows of the table, if needed
152152
// Then set the column and row attributes for alignment, spacing, and lines
153153
// Finally, add the frame, if needed
154154
//
155155
this.padRows();
156156
this.handleColumnAlign();
157-
this.handleColumnSpacing(lines, fspacing[0]);
157+
this.handleColumnSpacing(lines, fspacing[0] || '0');
158158
this.handleColumnLines();
159159
this.handleRowAlign();
160-
this.handleRowSpacing(lines, fspacing[1]);
160+
this.handleRowSpacing(lines, fspacing[1] || '0');
161161
this.handleRowLines();
162162
this.handleFrame(frame);
163163
this.handleWidth();
@@ -188,16 +188,16 @@ export class CHTMLmtable extends CHTMLWrapper {
188188
const cSpace = this.convertLengths(this.getColumnAttributes('columnspacing')).slice(0, cMax);
189189
const rSpace = this.convertLengths(this.getRowAttributes('rowspacing')).slice(0, rMax);
190190
const frame = this.node.attributes.get('frame') !== 'none';
191-
const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']);
191+
const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : []);
192192
const cLines = this.getColumnAttributes('columnlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
193193
const rLines = this.getColumnAttributes('rowlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
194194
const a = this.font.params.axis_height;
195195
const h = H.concat(D, rLines).reduce((a, b) => a + b) + (frame ? .14 : 0) +
196-
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
196+
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
197197
bbox.h = h / 2 + a;
198198
bbox.d = h / 2 - a;
199199
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
200-
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
200+
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
201201
}
202202

203203
/******************************************************************/
@@ -214,7 +214,7 @@ export class CHTMLmtable extends CHTMLWrapper {
214214
}
215215

216216
/*
217-
* Set the cell aligmentsbased on the table, row, or cell columnalign attributes
217+
* Set the cell aligments based on the table, row, or cell columnalign attributes
218218
*/
219219
protected handleColumnAlign() {
220220
const colAlign = this.getColumnAttributes('columnalign') || [];
@@ -377,7 +377,7 @@ export class CHTMLmtable extends CHTMLWrapper {
377377
}
378378

379379
/*
380-
* Add a frame to the mjx-itable, if needed
380+
* Add a frame to the mtable, if needed
381381
*/
382382
protected handleFrame(frame: boolean) {
383383
if (frame) {

0 commit comments

Comments
 (0)