@@ -408,7 +408,7 @@ fn generate_tag_name_completions(
408408 // Add closing based on what's already present
409409 match closing {
410410 ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
411- ClosingBrace :: PartialClose => insert_text. push_str ( " %" ) ,
411+ ClosingBrace :: PartialClose => insert_text. push_str ( " %} " ) , // Include full closing since we're replacing the auto-paired }
412412 ClosingBrace :: FullClose => { } // No closing needed
413413 }
414414
@@ -454,12 +454,12 @@ fn generate_tag_name_completions(
454454 // Only add closing if the snippet doesn't already include it
455455 // (snippets for tags with end tags include their own %} closing)
456456 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 ( " %" ) ,
461- ClosingBrace :: FullClose => { } // No closing needed
462- }
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+ }
463463 }
464464
465465 ( text, InsertTextFormat :: SNIPPET )
@@ -543,7 +543,7 @@ fn generate_argument_completions(
543543 // Add closing if needed
544544 match closing {
545545 ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
546- ClosingBrace :: PartialClose => insert_text. push_str ( " %" ) ,
546+ ClosingBrace :: PartialClose => insert_text. push_str ( " %} " ) , // Include full closing since we're replacing the auto-paired }
547547 ClosingBrace :: FullClose => { } // No closing needed
548548 }
549549
@@ -713,7 +713,7 @@ fn build_plain_insert_for_tag(
713713 // Add closing based on what's already present
714714 match closing {
715715 ClosingBrace :: None => insert_text. push_str ( " %}" ) ,
716- ClosingBrace :: PartialClose => insert_text. push_str ( " %" ) ,
716+ ClosingBrace :: PartialClose => 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