We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dee6615 commit 031504bCopy full SHA for 031504b
src/extensions/markdown/CodeBlock/CodeBlockHighlight/CodeBlockHighlight.ts
@@ -169,9 +169,7 @@ export const CodeBlockHighlight: ExtensionAuto<CodeBlockHighlightOptions> = (bui
169
let nodes: Root['children'];
170
171
const lang: string | undefined = node.attrs[codeBlockLangAttr];
172
- if (!lang) {
173
- nodes = lowlight.highlightAuto(node.textContent).children;
174
- } else if (lowlight.registered(lang)) {
+ if (lang && lowlight.registered(lang)) {
175
nodes = lowlight.highlight(lang, node.textContent).children;
176
} else {
177
continue;
0 commit comments