project: Set completion to undocumented if text empty (#11207)
I think the previous code was missing a `return` in there because it always overwrote the `completion.documentation` field, even if the `text.is_empty()` is true. Release Notes: - N/A
This commit is contained in:
parent
f96cab286c
commit
73d0600ad2
1 changed files with 3 additions and 7 deletions
|
@ -5723,13 +5723,9 @@ impl Project {
|
|||
return;
|
||||
};
|
||||
|
||||
if response.text.is_empty() {
|
||||
let mut completions = completions.write();
|
||||
let completion = &mut completions[completion_index];
|
||||
completion.documentation = Some(Documentation::Undocumented);
|
||||
}
|
||||
|
||||
let documentation = if response.is_markdown {
|
||||
let documentation = if response.text.is_empty() {
|
||||
Documentation::Undocumented
|
||||
} else if response.is_markdown {
|
||||
Documentation::MultiLineMarkdown(
|
||||
markdown::parse_markdown(&response.text, &language_registry, None).await,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue