File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,17 @@ export const textDocumentContentProvider: TextDocumentContentProvider = {
21
21
if ( ! item ) {
22
22
return `no diagnostic found for ${ fsPath } with range ${ JSON . stringify ( range ) } ` ;
23
23
}
24
- return item . contents . map ( ( content ) => content . value ) . join ( '\n' ) ;
24
+ const content = item . contents . map (
25
+ ( content ) => content . value
26
+ . replaceAll ( "```type\n" , '```typescript\n' ) )
27
+ . join ( '\n' ) ;
28
+ /*
29
+ Explanation
30
+ At this point the user has seen the tooltip and needs to see the markdown preview
31
+ The preview needed ```type to be formatted correctly to the user but this is no longer needed.
32
+ The markdown preview needs ```typescript to be formatted correctly.
33
+ */
34
+ return content ;
25
35
} ,
26
36
} ;
27
37
You can’t perform that action at this time.
0 commit comments