File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 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 ) {
285285
286286 text_align = text_align . replace ( [ "-webkit-auto" ] , [ "auto" ] ) ;
287287
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 ) ) {
289289 // this.setContextVariable(ctx,"textAlign",text_align);
290290 renderList = textNode . nodeValue . split ( / ( \b | ) / ) ;
291291
@@ -363,7 +363,10 @@ _html2canvas.Parse = function ( images, options ) {
363363 continue ;
364364 }
365365
366- newTextNode = oldTextNode . splitText ( renderList [ c ] . length ) ;
366+ if ( i < listLen - 1 )
367+ newTextNode = oldTextNode . splitText ( renderList [ c ] . length ) ;
368+ else
369+ newTextNode = null ;
367370
368371 parent = oldTextNode . parentNode ;
369372 wrapElement = doc . createElement ( 'wrapper' ) ;
You can’t perform that action at this time.
0 commit comments