mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +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');
|
previewNode.classList.add('emptyMarkdownCell');
|
||||||
} else {
|
} else {
|
||||||
previewNode.classList.remove('emptyMarkdownCell');
|
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);
|
const unsanitizedRenderedMarkdown = markdownIt.render(markdownText);
|
||||||
previewNode.innerHTML = (ctx.workspace.isTrusted
|
previewNode.innerHTML = (ctx.workspace.isTrusted
|
||||||
? unsanitizedRenderedMarkdown
|
? unsanitizedRenderedMarkdown
|
||||||
|
|
|
@ -122,7 +122,8 @@
|
||||||
"text/x-typescript",
|
"text/x-typescript",
|
||||||
"text/x-vb",
|
"text/x-vb",
|
||||||
"text/x-xml",
|
"text/x-xml",
|
||||||
"text/x-yaml"
|
"text/x-yaml",
|
||||||
|
"application/json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue