markdown: Move open_url
to the MarkdownElement
as on_url_click
(#28269)
Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
d3abc61728
commit
0414908c4a
6 changed files with 201 additions and 194 deletions
|
@ -624,16 +624,15 @@ impl CompletionsMenu {
|
|||
.map(|l| l.name().to_proto());
|
||||
Markdown::new(SharedString::default(), languages, language, cx)
|
||||
.copy_code_block_buttons(false)
|
||||
.open_url(open_markdown_url)
|
||||
})
|
||||
});
|
||||
markdown.update(cx, |markdown, cx| {
|
||||
markdown.reset(parsed.clone(), cx);
|
||||
});
|
||||
div().child(MarkdownElement::new(
|
||||
markdown.clone(),
|
||||
hover_markdown_style(window, cx),
|
||||
))
|
||||
div().child(
|
||||
MarkdownElement::new(markdown.clone(), hover_markdown_style(window, cx))
|
||||
.on_url_click(open_markdown_url),
|
||||
)
|
||||
}
|
||||
CompletionDocumentation::MultiLineMarkdown(_) => return None,
|
||||
CompletionDocumentation::SingleLine(_) => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue