File tree Expand file tree Collapse file tree
editor/contrib/hover/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export class MarkdownString implements IMarkdownString {
1717
1818 static isEmpty ( oneOrMany : IMarkdownString | IMarkdownString [ ] ) : boolean {
1919 if ( MarkdownString . isMarkdownString ( oneOrMany ) ) {
20- return Boolean ( oneOrMany . value ) ;
20+ return ! oneOrMany . value ;
2121 } else if ( Array . isArray ( oneOrMany ) ) {
2222 return oneOrMany . every ( MarkdownString . isEmpty ) ;
2323 } else {
@@ -49,11 +49,11 @@ export class MarkdownString implements IMarkdownString {
4949 }
5050
5151 appendCodeblock ( langId : string , code : string ) : this {
52- this . value += '```' ;
52+ this . value += '\n ```' ;
5353 this . value += langId ;
5454 this . value += '\n' ;
5555 this . value += code ;
56- this . value += '```\n' ;
56+ this . value += '\n ```\n' ;
5757 return this ;
5858 }
5959}
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
310310
311311 if ( ! ( msg instanceof ColorHover ) ) {
312312 msg . contents
313- . filter ( contents => ! ! contents )
313+ . filter ( contents => ! MarkdownString . isEmpty ( contents ) )
314314 . forEach ( contents => {
315315 const renderedContents = renderMarkdown ( contents , {
316316 actionCallback : ( content ) => {
You can’t perform that action at this time.
0 commit comments