Skip to content

Commit

Permalink
fix(code-block): pass language as class name (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed May 15, 2023
1 parent 28cfa85 commit cfe0afc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/markdown-parser/handler/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default (h: H, node: Node) => {
filename,
highlights,
meta: node.meta,
code
code,
className: [`language-${language}`]
},
[h(node, 'pre', {}, [h(node, 'code', { __ignoreMap: '' }, [u('text', code)])])]
)
Expand Down

0 comments on commit cfe0afc

Please sign in to comment.