mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-12 05:16:46 +00:00
fix missing closing brace
This commit is contained in:
parent
17514907fd
commit
b9845f2733
1 changed files with 9 additions and 9 deletions
|
@ -408,7 +408,7 @@ fn generate_tag_name_completions(
|
||||||
// Add closing based on what's already present
|
// Add closing based on what's already present
|
||||||
match closing {
|
match closing {
|
||||||
ClosingBrace::None => insert_text.push_str(" %}"),
|
ClosingBrace::None => insert_text.push_str(" %}"),
|
||||||
ClosingBrace::PartialClose => insert_text.push_str(" %"),
|
ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired }
|
||||||
ClosingBrace::FullClose => {} // No closing needed
|
ClosingBrace::FullClose => {} // No closing needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,12 +454,12 @@ fn generate_tag_name_completions(
|
||||||
// Only add closing if the snippet doesn't already include it
|
// Only add closing if the snippet doesn't already include it
|
||||||
// (snippets for tags with end tags include their own %} closing)
|
// (snippets for tags with end tags include their own %} closing)
|
||||||
if !snippet.contains("%}") {
|
if !snippet.contains("%}") {
|
||||||
// Add closing based on what's already present
|
// Add closing based on what's already present
|
||||||
match closing {
|
match closing {
|
||||||
ClosingBrace::None => text.push_str(" %}"),
|
ClosingBrace::None => text.push_str(" %}"),
|
||||||
ClosingBrace::PartialClose => text.push_str(" %"),
|
ClosingBrace::PartialClose => text.push_str(" %}"), // Include full closing since we're replacing the auto-paired }
|
||||||
ClosingBrace::FullClose => {} // No closing needed
|
ClosingBrace::FullClose => {} // No closing needed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(text, InsertTextFormat::SNIPPET)
|
(text, InsertTextFormat::SNIPPET)
|
||||||
|
@ -543,7 +543,7 @@ fn generate_argument_completions(
|
||||||
// Add closing if needed
|
// Add closing if needed
|
||||||
match closing {
|
match closing {
|
||||||
ClosingBrace::None => insert_text.push_str(" %}"),
|
ClosingBrace::None => insert_text.push_str(" %}"),
|
||||||
ClosingBrace::PartialClose => insert_text.push_str(" %"),
|
ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired }
|
||||||
ClosingBrace::FullClose => {} // No closing needed
|
ClosingBrace::FullClose => {} // No closing needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,7 +713,7 @@ fn build_plain_insert_for_tag(
|
||||||
// Add closing based on what's already present
|
// Add closing based on what's already present
|
||||||
match closing {
|
match closing {
|
||||||
ClosingBrace::None => insert_text.push_str(" %}"),
|
ClosingBrace::None => insert_text.push_str(" %}"),
|
||||||
ClosingBrace::PartialClose => insert_text.push_str(" %"),
|
ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired }
|
||||||
ClosingBrace::FullClose => {} // No closing needed
|
ClosingBrace::FullClose => {} // No closing needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue