File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ _html2canvas.Parse = function ( images, options ) {
285
285
286
286
text_align = text_align . replace ( [ "-webkit-auto" ] , [ "auto" ] ) ;
287
287
288
- if ( options . letterRendering === false && / ^ ( l e f t | r i g h t | j u s t i f y | a u t o ) $ / . test ( text_align ) && / ^ ( n o r m a l | n o n e ) $ / . test ( letter_spacing ) ) {
288
+ if ( options . letterRendering === false && / ^ ( l e f t | r i g h t | j u s t i f y | a u t o ) $ / . test ( text_align ) && / ^ ( n o r m a l | n o n e | 0 p x ) $ / . test ( letter_spacing ) ) {
289
289
// this.setContextVariable(ctx,"textAlign",text_align);
290
290
renderList = textNode . nodeValue . split ( / ( \b | ) / ) ;
291
291
@@ -363,7 +363,10 @@ _html2canvas.Parse = function ( images, options ) {
363
363
continue ;
364
364
}
365
365
366
- newTextNode = oldTextNode . splitText ( renderList [ c ] . length ) ;
366
+ if ( i < listLen - 1 )
367
+ newTextNode = oldTextNode . splitText ( renderList [ c ] . length ) ;
368
+ else
369
+ newTextNode = null ;
367
370
368
371
parent = oldTextNode . parentNode ;
369
372
wrapElement = doc . createElement ( 'wrapper' ) ;
You can’t perform that action at this time.
0 commit comments