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;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
if response.text.is_empty() {
|
let documentation = if response.text.is_empty() {
|
||||||
let mut completions = completions.write();
|
Documentation::Undocumented
|
||||||
let completion = &mut completions[completion_index];
|
} else if response.is_markdown {
|
||||||
completion.documentation = Some(Documentation::Undocumented);
|
|
||||||
}
|
|
||||||
|
|
||||||
let documentation = if response.is_markdown {
|
|
||||||
Documentation::MultiLineMarkdown(
|
Documentation::MultiLineMarkdown(
|
||||||
markdown::parse_markdown(&response.text, &language_registry, None).await,
|
markdown::parse_markdown(&response.text, &language_registry, None).await,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue