Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix interpretation of \n in hovers (#10214)

Mikayla Makife4b345603c5
diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs
index 6c27b0b3b05..51de4abb049 100644
--- a/crates/editor/src/hover_popover.rs
+++ b/crates/editor/src/hover_popover.rs
@@ -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,