There was an error while loading. Please reload this page.
1 parent ef5e2f3 commit 46e2c49Copy full SHA for 46e2c49
src/types.rs
@@ -515,11 +515,15 @@ impl ToDisplay for lsp::MarkedString {
515
fn to_display(&self) -> Vec<String> {
516
match *self {
517
MarkedString::String(ref s) => s.split('\n').map(|i| i.to_string()).collect(),
518
- MarkedString::LanguageString(ref ls) => vec![
519
- format!("```{}", ls.language),
520
- ls.value.split('\n').map(|i| i.to_string()).collect(),
521
- "```".to_string(),
522
- ],
+ MarkedString::LanguageString(ref ls) => {
+ let mut buf = Vec::new();
+
+ buf.push(format!("```{}", ls.language));
+ buf.extend(ls.value.split('\n').map(|i| i.to_string()));
523
+ buf.push("```".to_string());
524
525
+ buf
526
+ },
527
}
528
529
0 commit comments