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 5f3bbee commit b4e313bCopy full SHA for b4e313b
packages/markdown/src/plugins/codePlugin/codePlugin.ts
@@ -75,10 +75,12 @@ export const codePlugin: PluginWithOptions<CodePluginOptions> = (
75
options.highlight?.(token.content, language.name, '') ||
76
md.utils.escapeHtml(token.content)
77
78
+ token.attrJoin('class', languageClass)
79
+
80
// wrap highlighted code with `<pre>` and `<code>`
81
let result = code.startsWith('<pre')
82
? code
- : `<pre class="${languageClass}"><code>${code}</code></pre>`
83
+ : `<pre${slf.renderAttrs(token)}><code>${code}</code></pre>`
84
85
// resolve v-pre mark from token info
86
const useVPre = resolveVPre(info) ?? vPreBlock
0 commit comments