mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
fix #146750.
This commit is contained in:
parent
12f64a68ba
commit
ab2a987919
|
@ -204,7 +204,8 @@ export const activate: ActivationFunction<void> = (ctx) => {
|
|||
previewNode.classList.add('emptyMarkdownCell');
|
||||
} else {
|
||||
previewNode.classList.remove('emptyMarkdownCell');
|
||||
const markdownText = outputInfo.mime.startsWith('text/x-') ? `\`\`\`${outputInfo.mime.substr(7)}\n${text}\n\`\`\`` : text;
|
||||
const markdownText = outputInfo.mime.startsWith('text/x-') ? `\`\`\`${outputInfo.mime.substr(7)}\n${text}\n\`\`\``
|
||||
: (outputInfo.mime.startsWith('application/') ? `\`\`\`${outputInfo.mime.substr(12)}\n${text}\n\`\`\`` : text);
|
||||
const unsanitizedRenderedMarkdown = markdownIt.render(markdownText);
|
||||
previewNode.innerHTML = (ctx.workspace.isTrusted
|
||||
? unsanitizedRenderedMarkdown
|
||||
|
|
|
@ -122,7 +122,8 @@
|
|||
"text/x-typescript",
|
||||
"text/x-vb",
|
||||
"text/x-xml",
|
||||
"text/x-yaml"
|
||||
"text/x-yaml",
|
||||
"application/json"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue