Fix interpretation of \n in hovers (#10214)
I ran into this specifically when looking at the documentation of https://crates.io/crates/wayland-client Release Notes: - Fixed a bug where some hover popovers would render `\n` instead of a new line.
This commit is contained in:
parent
7b636d9774
commit
fe4b345603
1 changed files with 2 additions and 2 deletions
|
@ -375,12 +375,12 @@ async fn parse_blocks(
|
|||
match &block.kind {
|
||||
HoverBlockKind::PlainText => {
|
||||
markdown::new_paragraph(&mut text, &mut Vec::new());
|
||||
text.push_str(&block.text);
|
||||
text.push_str(&block.text.replace("\\n", "\n"));
|
||||
}
|
||||
|
||||
HoverBlockKind::Markdown => {
|
||||
markdown::parse_markdown_block(
|
||||
&block.text,
|
||||
&block.text.replace("\\n", "\n"),
|
||||
language_registry,
|
||||
language.clone(),
|
||||
&mut text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue