Handle empty table cells (still need to do something about setting the widths of columns with no entry in the top row).
This commit is contained in:
parent
7343e81dba
commit
3c47494d28
|
@ -346,7 +346,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
|
||||||
else if (CWIDTH[j].match(/%$/)) percent.push(j)
|
else if (CWIDTH[j].match(/%$/)) percent.push(j)
|
||||||
else W[j] = CHTML.length2em(CWIDTH[j],W[j]);
|
else W[j] = CHTML.length2em(CWIDTH[j],W[j]);
|
||||||
TW += W[j] + CSPACE[j];
|
TW += W[j] + CSPACE[j];
|
||||||
row[j].style.width = CHTML.Em(W[j]);
|
if (row[j]) row[j].style.width = CHTML.Em(W[j]);
|
||||||
}
|
}
|
||||||
if (values.frame) TW += 2/CHTML.em;
|
if (values.frame) TW += 2/CHTML.em;
|
||||||
var hasFit = (fit.length > 0);
|
var hasFit = (fit.length > 0);
|
||||||
|
@ -416,6 +416,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
|
||||||
if (!state.HD) {h = H[i]; d = D[i]}
|
if (!state.HD) {h = H[i]; d = D[i]}
|
||||||
for (var j = 0; j <= J; j++) {
|
for (var j = 0; j <= J; j++) {
|
||||||
var cell = row[j], cdata = rdata.data[j];
|
var cell = row[j], cdata = rdata.data[j];
|
||||||
|
if (!cdata) continue;
|
||||||
if (cdata.CHTML.stretch === "V") cdata.CHTMLstretchV(h,d);
|
if (cdata.CHTML.stretch === "V") cdata.CHTMLstretchV(h,d);
|
||||||
else if (cdata.CHTML.stretch === "H") cdata.CHTMLstretchH(cell,W[j]);
|
else if (cdata.CHTML.stretch === "H") cdata.CHTMLstretchH(cell,W[j]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user