Fix hovers use of MarkedString to IMarkdownString

The conversion code for hovers ignored MarkedString's `language`
property which caused the content to be rendered incorrectly. The
code has been corrected to honour the property and now creates the
code block correctly.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
This commit is contained in:
Remy Suen 2018-04-06 16:57:35 +09:00
parent 75cf77eb64
commit b622773393

View file

@ -249,7 +249,7 @@ function toMarkdownString(entry: ls.MarkupContent | ls.MarkedString): monaco.IMa
};
}
return { value: '```' + entry.value + '\n' + entry.value + '\n```\n' };
return { value: '```' + entry.language + '\n' + entry.value + '\n```\n' };
}
function toMarkedStringArray(contents: ls.MarkupContent | ls.MarkedString | ls.MarkedString[]): monaco.IMarkdownString[] {