mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Fix markdown code block styling (#198351)
Fixes #198183 Remove extra background and also removes the extra divs inside of the code blocks as these were causing issues with styling (extra padding)
This commit is contained in:
@@ -398,15 +398,14 @@ async function getMarkdownOptions(md: () => MarkdownIt): Promise<MarkdownIt.Opti
|
||||
lang = normalizeHighlightLang(lang);
|
||||
if (lang && hljs.getLanguage(lang)) {
|
||||
try {
|
||||
const highlighted = hljs.highlight(str, {
|
||||
return hljs.highlight(str, {
|
||||
language: lang,
|
||||
ignoreIllegals: true,
|
||||
}).value;
|
||||
return `<div>${highlighted}</div>`;
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
return `<code><div>${md().utils.escapeHtml(str)}</div></code>`;
|
||||
return md().utils.escapeHtml(str);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user