File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
extensions/markdown-language-features Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ export const activate: ActivationFunction<void> = (ctx) => {
204
204
previewNode . classList . add ( 'emptyMarkdownCell' ) ;
205
205
} else {
206
206
previewNode . classList . remove ( 'emptyMarkdownCell' ) ;
207
- const markdownText = outputInfo . mime . startsWith ( 'text/x-' ) ? `\`\`\`${ outputInfo . mime . substr ( 7 ) } \n${ text } \n\`\`\`` : text ;
207
+ const markdownText = outputInfo . mime . startsWith ( 'text/x-' ) ? `\`\`\`${ outputInfo . mime . substr ( 7 ) } \n${ text } \n\`\`\``
208
+ : ( outputInfo . mime . startsWith ( 'application/' ) ? `\`\`\`${ outputInfo . mime . substr ( 12 ) } \n${ text } \n\`\`\`` : text ) ;
208
209
const unsanitizedRenderedMarkdown = markdownIt . render ( markdownText ) ;
209
210
previewNode . innerHTML = ( ctx . workspace . isTrusted
210
211
? unsanitizedRenderedMarkdown
Original file line number Diff line number Diff line change 122
122
" text/x-typescript" ,
123
123
" text/x-vb" ,
124
124
" text/x-xml" ,
125
- " text/x-yaml"
125
+ " text/x-yaml" ,
126
+ " application/json"
126
127
]
127
128
}
128
129
],
You can’t perform that action at this time.
0 commit comments