Skip to content

Commit 668585f

Browse files
committed
Fix several problems with stretchy delimiters in SVG output (minsize didn't always get processed, stretched characters weren't marked as such).
1 parent 8eb0294 commit 668585f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

unpacked/jax/output/SVG/jax.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,8 +1325,15 @@
13251325
},
13261326

13271327
SVGcanStretch: function (direction) {
1328-
if (this.isEmbellished()) {return this.Core().SVGcanStretch(direction)}
1329-
return false;
1328+
var can = false;
1329+
if (this.isEmbellished()) {
1330+
var core = this.Core();
1331+
if (core && core !== this) {
1332+
can = core.SVGcanStretch(direction);
1333+
if (can && core.forceStretch) {this.forceStretch = true}
1334+
}
1335+
}
1336+
return can;
13301337
},
13311338
SVGstretchV: function (h,d) {return this.toSVG(h,d)},
13321339
SVGstretchH: function (w) {return this.toSVG(w)},
@@ -1425,7 +1432,7 @@
14251432
CoreParent: function () {
14261433
var parent = this;
14271434
while (parent && parent.isEmbellished() &&
1428-
parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()}
1435+
parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()}
14291436
return parent;
14301437
},
14311438
CoreText: function (parent) {
@@ -1486,6 +1493,7 @@
14861493
this.SVGhandleColor(svg);
14871494
delete this.svg.element;
14881495
this.SVGsaveData(svg);
1496+
svg.stretched = true;
14891497
return svg;
14901498
},
14911499
SVGstretchH: function (w) {
@@ -1502,6 +1510,7 @@
15021510
this.SVGhandleColor(svg);
15031511
delete this.svg.element;
15041512
this.SVGsaveData(svg);
1513+
svg.stretched = true;
15051514
return svg;
15061515
}
15071516
});

0 commit comments

Comments
 (0)