@@ -106,7 +106,7 @@ export function applyCssSplits(
106
106
if ( hackCss ) {
107
107
adaptedCss = adaptCssForReplay ( cssTextSplits . join ( '' ) , cache ) ;
108
108
}
109
- let ix_start = 0 ;
109
+ let startIndex = 0 ;
110
110
for ( let i = 0 ; i < childTextNodes . length ; i ++ ) {
111
111
if ( i === cssTextSplits . length ) {
112
112
break ;
@@ -115,31 +115,31 @@ export function applyCssSplits(
115
115
if ( ! hackCss ) {
116
116
childTextNode . textContent = cssTextSplits [ i ] ;
117
117
} else if ( i < childTextNodes . length - 1 ) {
118
- let ix_end = ix_start ;
119
- let end_search = cssTextSplits [ i + 1 ] . length ;
118
+ let endIndex = startIndex ;
119
+ let endSearch = cssTextSplits [ i + 1 ] . length ;
120
120
121
121
// don't do hundreds of searches, in case a mismatch
122
122
// is caused close to start of string
123
- end_search = Math . min ( end_search , 30 ) ;
123
+ endSearch = Math . min ( endSearch , 30 ) ;
124
124
125
125
let found = false ;
126
- for ( ; end_search > 2 ; end_search -- ) {
127
- let search_bit = cssTextSplits [ i + 1 ] . substring ( 0 , end_search ) ;
128
- let search_ix = adaptedCss . substring ( ix_start ) . indexOf ( search_bit ) ;
129
- found = search_ix !== - 1 ;
126
+ for ( ; endSearch > 2 ; endSearch -- ) {
127
+ let searchBit = cssTextSplits [ i + 1 ] . substring ( 0 , endSearch ) ;
128
+ let searchIndex = adaptedCss . substring ( startIndex ) . indexOf ( searchBit ) ;
129
+ found = searchIndex !== - 1 ;
130
130
if ( found ) {
131
- ix_end += search_ix ;
131
+ endIndex += searchIndex ;
132
132
break ;
133
133
}
134
134
}
135
135
if ( ! found ) {
136
136
// something went wrong, put a similar sized chunk in the right place
137
- ix_end += cssTextSplits [ i ] . length ;
137
+ endIndex += cssTextSplits [ i ] . length ;
138
138
}
139
- childTextNode . textContent = adaptedCss . substring ( ix_start , ix_end ) ;
140
- ix_start = ix_end ;
139
+ childTextNode . textContent = adaptedCss . substring ( startIndex , endIndex ) ;
140
+ startIndex = endIndex ;
141
141
} else {
142
- childTextNode . textContent = adaptedCss . substring ( ix_start ) ;
142
+ childTextNode . textContent = adaptedCss . substring ( startIndex ) ;
143
143
}
144
144
}
145
145
}
0 commit comments