mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
Add Syntax Highlighting to Sidebar Code Snippets
This commit is contained in:
parent
f86b84dcc6
commit
a69e1b940f
1 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ const RenderToken = ({ token, nested = false }: { token: Token | string, nested?
|
|||
}
|
||||
|
||||
if (t.type === "code") {
|
||||
return <BlockCode text={t.text} />
|
||||
return <BlockCode text={t.text} language={t.lang} />
|
||||
}
|
||||
|
||||
if (t.type === "heading") {
|
||||
|
|
@ -165,4 +165,4 @@ const MarkdownRender = ({ string, nested = false }: { string: string, nested?: b
|
|||
)
|
||||
}
|
||||
|
||||
export default MarkdownRender
|
||||
export default MarkdownRender
|
||||
|
|
|
|||
Loading…
Reference in a new issue