File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,15 @@ pub fn css_to_style_literal<'a>(
145145 let mut all_literals = true ;
146146 let mut literal_values = Vec :: new ( ) ;
147147
148- for ( _, idx) in & found_placeholders {
148+ let mut iter = found_placeholders. iter ( ) ;
149+ while all_literals && let Some ( ( _, idx) ) = iter. next ( ) {
149150 if * idx < css. expressions . len ( )
150151 && let Some ( literal_value) =
151152 get_string_by_literal_expression ( & css. expressions [ * idx] )
152153 {
153154 literal_values. push ( ( * idx, literal_value) ) ;
154155 } else {
155156 all_literals = false ;
156- break ;
157157 }
158158 }
159159
@@ -246,7 +246,6 @@ pub fn css_to_style_literal<'a>(
246246 in_ternary_string = true ;
247247 result. push ( '\'' ) ;
248248 chars. next ( ) ; // consume the "
249- continue ;
250249 }
251250 } else if in_ternary_string && ch == '"' {
252251 // Check if this is a closing quote by looking ahead
@@ -264,10 +263,10 @@ pub fn css_to_style_literal<'a>(
264263 {
265264 result. push ( '\'' ) ;
266265 in_ternary_string = false ;
267- continue ;
266+ } else {
267+ // Not a closing quote, keep as is
268+ result. push ( ch) ;
268269 }
269- // Not a closing quote, keep as is
270- result. push ( ch) ;
271270 } else {
272271 result. push ( ch) ;
273272 }
You can’t perform that action at this time.
0 commit comments