Handle linebreaking in a base with empty superscript or subscript. Resolves issue #949.

This commit is contained in:
Davide P. Cervone 2014-12-27 11:59:15 -05:00
parent a719a551e1
commit 8fd8bf258b

View File

@ -514,7 +514,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
// //
if (end.length === 0) { if (end.length === 0) {
var s = this.data[this.sup] || this.data[this.sub]; var s = this.data[this.sup] || this.data[this.sub];
if (s) { if (s && this.HTMLnotEmpty(s)) {
var box = s.HTMLspanElement().parentNode, stack = box.parentNode; var box = s.HTMLspanElement().parentNode, stack = box.parentNode;
if (this.data[this.base]) {stack.removeChild(stack.firstChild)} if (this.data[this.base]) {stack.removeChild(stack.firstChild)}
for (box = stack.firstChild; box; box = box.nextSibling) for (box = stack.firstChild; box; box = box.nextSibling)