Markdown Hover documentation not rendered correctly.
Rendering of markdown documentation provided by rust-analyzer is currently broken.
This is what it looks like in VSCode:
This is how it looks like in Gnome Builder:
This is the raw markdown in the source file
Prints to the standard output.
Equivalent to the [`println!`] macro except that a newline is not printed at
the end of the message.
Note that stdout is frequently line-buffered by default so it may be
necessary to use [`io::stdout().flush()`][flush] to ensure the output is emitted
immediately.
Use `print!` only for the primary output of your program. Use
[`eprint!`] instead to print error and progress messages.
[flush]: crate::io::Write::flush
# Panics
Panics if writing to `io::stdout()` fails.
# Examples
```
use std::io::{self, Write};
print!("this ");
print!("will ");
print!("be ");
print!("on ");
print!("the ");
print!("same ");
print!("line ");
io::stdout().flush().unwrap();
print!("this string has a newline, why not choose println! instead?\n");
io::stdout().flush().unwrap();
```
I'm currently trying to fix this.
The first problem I hit was that the markdown already seems to be broken in ide_lsp_hover_provider_hover_cb
.
I printed out the reply
GVariant
, and its 'value'
field looks like this:
Click to expand
std
#[macro_export] macro_rules! print
Prints to the standard output.Equivalent to the [println!] macro except that a newline is not printed at
the end of the message.Note that stdout is frequently line-buffered by default so it may be
necessary to use io::stdout().flush() to ensure the output is emitted
immediately.Use print! only for the primary output of your program. Use
[eprint!] instead to print error and progress messages.PanicsPanics if writing to io::stdout() fails.Examplesuse std::io::{self, Write};
print!("this ");
print!("will ");
print!("be ");
print!("on ");
print!("the ");
print!("same ");
print!("line ");
io::stdout().flush().unwrap();
print!("this string has a newline, why not choose println! instead?\n");
io::stdout().flush().unwrap();
Some characters like triple backticks, #
for headings and some newlines are missing already.
Not sure where I can look next to see why the messages look like this.