From 309dbc5a4a60f9e9a6d74f9a2340de32cc5d9b47 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 21 Mar 2014 16:54:10 -0400 Subject: [PATCH] If a break occurs at a space or operator that has non-zero width, don't remove next element's initial spacing. --- unpacked/jax/output/HTML-CSS/autoload/multiline.js | 3 ++- unpacked/jax/output/SVG/autoload/multiline.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/autoload/multiline.js b/unpacked/jax/output/HTML-CSS/autoload/multiline.js index 09d90774a..191c02aa0 100644 --- a/unpacked/jax/output/HTML-CSS/autoload/multiline.js +++ b/unpacked/jax/output/HTML-CSS/autoload/multiline.js @@ -369,7 +369,8 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { span.style.paddingLeft = ""; if (color) {this.HTMLremoveColor(span); this.HTMLhandleColor(span)} } - if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst} + if (state.first && span.bbox.w === 0) {state.nextIsFirst = true} + else {delete state.nextIsFirst} // // Update bounding box // diff --git a/unpacked/jax/output/SVG/autoload/multiline.js b/unpacked/jax/output/SVG/autoload/multiline.js index a5bd05eac..07eb4c0ee 100644 --- a/unpacked/jax/output/SVG/autoload/multiline.js +++ b/unpacked/jax/output/SVG/autoload/multiline.js @@ -336,7 +336,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { if (state.last && svg.X) {svg.X = 0} line.Add(svg,line.w,0,true); } - if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst} + if (state.first && svg.w === 0) {state.nextIsFirst = true} + else {delete state.nextIsFirst} } });