Remove initial space after a linebreak properly. Resolves #687.
This commit is contained in:
parent
283cff4289
commit
12f969593d
|
@ -366,15 +366,15 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
||||||
//
|
//
|
||||||
if (state.last) {span.style.paddingRight = ""}
|
if (state.last) {span.style.paddingRight = ""}
|
||||||
if (state.first || state.nextIsFirst) {
|
if (state.first || state.nextIsFirst) {
|
||||||
delete state.nextIsFirst;
|
|
||||||
span.style.paddingLeft = "";
|
span.style.paddingLeft = "";
|
||||||
if (color) {this.HTMLremoveColor(span); this.HTMLhandleColor(span)}
|
if (color) {this.HTMLremoveColor(span); this.HTMLhandleColor(span)}
|
||||||
}
|
}
|
||||||
|
if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
|
||||||
//
|
//
|
||||||
// Update bounding box
|
// Update bounding box
|
||||||
//
|
//
|
||||||
this.HTMLcombineBBoxes(this,line.bbox);
|
this.HTMLcombineBBoxes(this,line.bbox);
|
||||||
} else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -328,14 +328,15 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||||
(state.last && values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER)) {
|
(state.last && values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER)) {
|
||||||
//
|
//
|
||||||
// Recreate output
|
// Recreate output
|
||||||
// Remove padding (if first, remove at right, if last remove at left)
|
// Remove padding (if first, remove at leftt, if last remove at right)
|
||||||
// Add to line
|
// Add to line
|
||||||
//
|
//
|
||||||
var svg = this.toSVG(this.SVGdata.HW,this.SVGdata.D);
|
var svg = this.toSVG(this.SVGdata.HW,this.SVGdata.D);
|
||||||
if (state.last) {svg.x = 0}
|
if (state.first || state.nextIsFirst) {svg.x = 0}
|
||||||
if (state.first || state.nextIsFirst) {delete state.nextIsFirst; if (svg.X) {svg.X = 0}}
|
if (state.last && svg.X) {svg.X = 0}
|
||||||
line.Add(svg,line.w,0,true);
|
line.Add(svg,line.w,0,true);
|
||||||
} else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
|
}
|
||||||
|
if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user