Skip to content

Commit 003df73

Browse files
committed
Fix issues reported by Volker
1 parent 2abe078 commit 003df73

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
@@ -88,18 +88,18 @@ export class CHTMLmtable extends CHTMLWrapper {
8888
const attributes = this.node.attributes;
8989
const frame = attributes.get('frame') !== 'none';
9090
const lines = frame || attributes.get('columnlines') !== 'none' || attributes.get('rowlines') !== 'none';
91-
const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']);
91+
const fspacing = (lines ? this.convertLengths(this.getAttributeArray('framespacing')) : []);
9292
//
9393
// Pad the rows of the table, if needed
9494
// Then set the column and row attributes for alignment, spacing, and lines
9595
// Finally, add the frame, if needed
9696
//
9797
this.padRows();
9898
this.handleColumnAlign();
99-
this.handleColumnSpacing(lines, fspacing[0]);
99+
this.handleColumnSpacing(lines, fspacing[0] || '0');
100100
this.handleColumnLines();
101101
this.handleRowAlign();
102-
this.handleRowSpacing(lines, fspacing[1]);
102+
this.handleRowSpacing(lines, fspacing[1] || '0');
103103
this.handleRowLines();
104104
this.handleFrame(frame);
105105
}
@@ -129,16 +129,16 @@ export class CHTMLmtable extends CHTMLWrapper {
129129
const cSpace = this.convertLengths(this.getColumnAttributes('columnspacing')).slice(0, cMax);
130130
const rSpace = this.convertLengths(this.getRowAttributes('rowspacing')).slice(0, rMax);
131131
const frame = this.node.attributes.get('frame') !== 'none';
132-
const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : ['0', '0']);
132+
const fSpace = (frame ? this.convertLengths(this.getAttributeArray('framespacing')) : []);
133133
const cLines = this.getColumnAttributes('columnlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
134134
const rLines = this.getColumnAttributes('rowlines').slice(0, cMax).map(x => (x === 'none' ? 0 : .07));
135135
const a = this.font.params.axis_height;
136136
const h = H.concat(D, rLines).reduce((a, b) => a + b) + (frame ? .14 : 0) +
137-
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
137+
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
138138
this.bbox.h = h / 2 + a;
139139
this.bbox.d = h / 2 - a;
140140
this.bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
141-
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
141+
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
142142
return this.bbox;
143143
}
144144

@@ -156,7 +156,7 @@ export class CHTMLmtable extends CHTMLWrapper {
156156
}
157157

158158
/*
159-
* Set the cell aligmentsbased on the table, row, or cell columnalign attributes
159+
* Set the cell aligments based on the table, row, or cell columnalign attributes
160160
*/
161161
protected handleColumnAlign() {
162162
const colAlign = this.getColumnAttributes('columnalign') || [];
@@ -319,7 +319,7 @@ export class CHTMLmtable extends CHTMLWrapper {
319319
}
320320

321321
/*
322-
* Add a frame to the mjx-itable, if needed
322+
* Add a frame to the mtable, if needed
323323
*/
324324
protected handleFrame(frame: boolean) {
325325
if (frame) {

0 commit comments

Comments
 (0)