@@ -407,8 +407,9 @@ fn generate_tag_name_completions(
407407
408408 // Add closing based on what's already present
409409 match closing {
410- ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
411- ClosingBrace :: PartialClose => insert_text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
410+ ClosingBrace :: PartialClose | ClosingBrace :: None => {
411+ insert_text. push_str ( " %}" ) ;
412+ }
412413 ClosingBrace :: FullClose => { } // No closing needed
413414 }
414415
@@ -454,12 +455,13 @@ fn generate_tag_name_completions(
454455 // Only add closing if the snippet doesn't already include it
455456 // (snippets for tags with end tags include their own %} closing)
456457 if !snippet. contains ( "%}" ) {
457- // Add closing based on what's already present
458- match closing {
459- ClosingBrace :: None => text. push_str ( " %}" ) ,
460- ClosingBrace :: PartialClose => text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
461- ClosingBrace :: FullClose => { } // No closing needed
462- }
458+ // Add closing based on what's already present
459+ match closing {
460+ ClosingBrace :: PartialClose | ClosingBrace :: None => {
461+ text. push_str ( " %}" ) ;
462+ }
463+ ClosingBrace :: FullClose => { } // No closing needed
464+ }
463465 }
464466
465467 ( text, InsertTextFormat :: SNIPPET )
@@ -542,8 +544,7 @@ fn generate_argument_completions(
542544
543545 // Add closing if needed
544546 match closing {
545- ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
546- ClosingBrace :: PartialClose => insert_text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
547+ ClosingBrace :: PartialClose | ClosingBrace :: None => insert_text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
547548 ClosingBrace :: FullClose => { } // No closing needed
548549 }
549550
@@ -712,8 +713,7 @@ fn build_plain_insert_for_tag(
712713
713714 // Add closing based on what's already present
714715 match closing {
715- ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
716- ClosingBrace :: PartialClose => insert_text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
716+ ClosingBrace :: PartialClose | ClosingBrace :: None => insert_text. push_str ( " %}" ) , // Include full closing since we're replacing the auto-paired }
717717 ClosingBrace :: FullClose => { } // No closing needed
718718 }
719719
0 commit comments