File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
40
40
badbreak : [ + 200 ] ,
41
41
auto : [ 0 ] ,
42
42
43
+ maxwidth : 1.33 , // stop looking for breaks after this time the line-break width
43
44
toobig : 800 ,
44
45
nestfactor : 400 ,
45
46
spacefactor : - 100 ,
@@ -150,7 +151,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
150
151
// Look through the line for breakpoints,
151
152
// (as long as we are not too far past the breaking width)
152
153
//
153
- while ( i < m && info . scanW < 1.33 * CHTML . linebreakWidth ) {
154
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * CHTML . linebreakWidth || info . w === 0 ) ) {
154
155
if ( this . data [ i ] ) {
155
156
if ( this . data [ i ] . CHTMLbetterBreak ( info , state ) ) {
156
157
better = true ; index = [ i ] . concat ( info . index ) ; W = info . W ; w = info . w ;
@@ -400,7 +401,7 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
400
401
// Look through the line for breakpoints, including the open, close, and separators
401
402
// (as long as we are not too far past the breaking width)
402
403
//
403
- while ( i < m && info . scanW < 1.33 * CHTML . linebreakWidth ) {
404
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * CHTML . linebreakWidth || info . w === 0 ) ) {
404
405
var k = this . dataI [ i ] ;
405
406
if ( this . data [ k ] ) {
406
407
if ( this . data [ k ] . CHTMLbetterBreak ( info , state ) ) {
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
39
39
badbreak : [ + 200 ] ,
40
40
auto : [ 0 ] ,
41
41
42
+ maxwidth : 1.33 , // stop looking for breaks after this time the line-break width
42
43
toobig : 800 ,
43
44
nestfactor : 400 ,
44
45
spacefactor : - 100 ,
@@ -157,7 +158,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
157
158
// Look through the line for breakpoints,
158
159
// (as long as we are not too far past the breaking width)
159
160
//
160
- while ( i < m && info . scanW < 1.33 * HTMLCSS . linebreakWidth ) {
161
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * HTMLCSS . linebreakWidth || info . w === 0 ) ) {
161
162
if ( this . data [ i ] ) {
162
163
if ( this . data [ i ] . HTMLbetterBreak ( info , state ) ) {
163
164
better = true ; index = [ i ] . concat ( info . index ) ; W = info . W ; w = info . w ;
@@ -411,7 +412,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
411
412
// Look through the line for breakpoints, including the open, close, and separators
412
413
// (as long as we are not too far past the breaking width)
413
414
//
414
- while ( i < m && info . scanW < 1.33 * HTMLCSS . linebreakWidth ) {
415
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * HTMLCSS . linebreakWidth || info . w === 0 ) ) {
415
416
var k = this . dataI [ i ] ;
416
417
if ( this . data [ k ] ) {
417
418
if ( this . data [ k ] . HTMLbetterBreak ( info , state ) ) {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
40
40
badbreak : [ + 200 ] ,
41
41
auto : [ 0 ] ,
42
42
43
+ maxwidth : 1.33 , // stop looking for breaks after this time the line-break width
43
44
toobig : 800 ,
44
45
nestfactor : 400 ,
45
46
spacefactor : - 100 ,
@@ -162,7 +163,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
162
163
// Look through the line for breakpoints,
163
164
// (as long as we are not too far past the breaking width)
164
165
//
165
- while ( i < m && info . scanW < 1.33 * SVG . linebreakWidth ) {
166
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * SVG . linebreakWidth || info . w === 0 ) ) {
166
167
if ( this . data [ i ] ) {
167
168
if ( this . data [ i ] . SVGbetterBreak ( info , state ) ) {
168
169
better = true ; index = [ i ] . concat ( info . index ) ; W = info . W ; w = info . w ;
@@ -370,7 +371,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
370
371
// Look through the line for breakpoints, including the open, close, and separators
371
372
// (as long as we are not too far past the breaking width)
372
373
//
373
- while ( i < m && info . scanW < 1.33 * SVG . linebreakWidth ) {
374
+ while ( i < m && ( info . scanW < PENALTY . maxwidth * SVG . linebreakWidth || info . w === 0 ) ) {
374
375
var k = this . dataI [ i ] ;
375
376
if ( this . data [ k ] ) {
376
377
if ( this . data [ k ] . SVGbetterBreak ( info , state ) ) {
You can’t perform that action at this time.
0 commit comments