commit 309dbc5a4a60f9e9a6d74f9a2340de32cc5d9b47
parent 12f969593d9c885caaa1252ab53c32e27cda2c2d
Author: Davide P. Cervone <dpvc@union.edu>
Date: Fri, 21 Mar 2014 16:54:10 -0400
If a break occurs at a space or operator that has non-zero width, don't remove next element's initial spacing.
Diffstat:
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
@@ -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
@@ -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}
}
});