Skip to content

Commit

Permalink
Add back code-block
Browse files Browse the repository at this point in the history
  • Loading branch information
woofers committed Jun 9, 2024
1 parent 1231955 commit b29baef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/website/src/components/code-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ const CodeBlock = ({ children, lang = 'language-jsx', ...rest }) => {
useEffect(() => {
setId(true)
}, [setId])
return <Pre></Pre>
return (
<Pre>
<Content
className={`hljs language-${shortLang}`}
as="code"
html={toHtml(lowlight.highlight(id ? shortLang : 'c', children))}
/>
</Pre>
)
}

export default CodeBlock

0 comments on commit b29baef

Please sign in to comment.