From f64e50f9eb8171766b266e52faffa71566325509 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 18 Mar 2015 11:28:17 -0400 Subject: [PATCH] Use BBOX.updateFrom() in semantics, and handle mstyle with no children. --- unpacked/jax/output/CommonHTML/jax.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index 17f5a5ab0..2cfad14f1 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -2182,7 +2182,7 @@ MML.mstyle.Augment({ toCommonHTML: function (node) { node = this.CHTMLdefaultNode(node); - if (this.scriptlevel) this.CHTML.rescale(this.data[0].CHTML.rscale); + if (this.scriptlevel && this.data[0]) this.CHTML.rescale(this.data[0].CHTML.rscale); return node; } }); @@ -2281,10 +2281,10 @@ MML.semantics.Augment({ toCommonHTML: function (node) { node = this.CHTMLcreateNode(node); - if (this.data[0]) { - this.data[0].toCommonHTML(node); - MathJax.Hub.Insert(this.data[0].CHTML||{},this.CHTML); - } + if (this.data[0]) { + this.data[0].toCommonHTML(node); + this.CHTML.updateFrom(this.data[0].CHTML); + } return node; } });