Skip to content

Commit

Permalink
Fix hovers use of MarkedString to IMarkdownString
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rcjsuen committed Apr 6, 2018
1 parent 75cf77e commit b622773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down

0 comments on commit b622773

Please sign in to comment.