This repository was archived by the owner on Apr 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ <h1>Extract Source Spans Test</h1>
109109 }
110110 actual . innerHTML = '<pre>' + actualHtml + '<\/pre>' ;
111111 var goldenText = testResult . innerText || testResult . textContent ;
112- var goldenNormalized = '"' + goldenText + '"' ;
112+ var goldenNormalized = '"' + goldenText . replace ( / (?: \r \n ? | \n ) $ / , '' ) + '"' ;
113113 var actualNormalized = stringify ( actualText ) ;
114114 var passed = actualNormalized === goldenNormalized ;
115115 if ( ! passed ) {
@@ -125,5 +125,5 @@ <h1>Extract Source Spans Test</h1>
125125
126126< hr >
127127< address > </ address >
128- <!-- hhmts start --> Last modified: Tue Mar 29 16:21:19 PDT 2011 <!-- hhmts end -->
128+ <!-- hhmts start --> Last modified: Tue Mar 29 16:38:23 PDT 2011 <!-- hhmts end -->
129129</ body > </ html >
Original file line number Diff line number Diff line change @@ -107,8 +107,9 @@ function numberLines(node, opt_startLineNum) {
107107 var copiedListItem = breakLeftOf ( lineEndNode . nextSibling , 0 ) ;
108108
109109 // Walk the parent chain until we reach an unattached LI.
110- // Check nodeType since IE sticks useless document fragments around things.
111- for ( var parent ; ( parent = copiedListItem . parentNode ) && parent . nodeType === 1 ; ) {
110+ for ( var parent ;
111+ // Check nodeType since IE invents document fragments.
112+ ( parent = copiedListItem . parentNode ) && parent . nodeType === 1 ; ) {
112113 copiedListItem = parent ;
113114 }
114115 // Put it on the list of lines for later processing.
Original file line number Diff line number Diff line change @@ -957,12 +957,16 @@ window['PR']
957957 return rightSide ;
958958 }
959959
960- var split = breakLeftOf ( lineEndNode . nextSibling , 0 ) ;
960+ var copiedListItem = breakLeftOf ( lineEndNode . nextSibling , 0 ) ;
961961
962962 // Walk the parent chain until we reach an unattached LI.
963- for ( var parent ; ( parent = split . parentNode ) ; ) { split = parent ; }
963+ for ( var parent ;
964+ // Check nodeType since IE invents document fragments.
965+ ( parent = copiedListItem . parentNode ) && parent . nodeType === 1 ; ) {
966+ copiedListItem = parent ;
967+ }
964968 // Put it on the list of lines for later processing.
965- listItems . push ( split ) ;
969+ listItems . push ( copiedListItem ) ;
966970 }
967971
968972 // Split lines while there are lines left to split.
You can’t perform that action at this time.
0 commit comments