summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/components/CodeBlock.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/src/components/CodeBlock.tsx')
-rw-r--r--packages/web/src/components/CodeBlock.tsx14
1 files changed, 5 insertions, 9 deletions
diff --git a/packages/web/src/components/CodeBlock.tsx b/packages/web/src/components/CodeBlock.tsx
index 17559ece1..f410ab070 100644
--- a/packages/web/src/components/CodeBlock.tsx
+++ b/packages/web/src/components/CodeBlock.tsx
@@ -6,7 +6,7 @@ import {
createResource,
} from "solid-js"
import { codeToHtml } from "shiki"
-import { transformerNotationDiff } from '@shikijs/transformers'
+import { transformerNotationDiff } from "@shikijs/transformers"
interface CodeBlockProps extends JSX.HTMLAttributes<HTMLDivElement> {
code: string
@@ -20,12 +20,10 @@ function CodeBlock(props: CodeBlockProps) {
return (await codeToHtml(local.code, {
lang: local.lang || "text",
themes: {
- light: 'github-light',
- dark: 'github-dark',
+ light: "github-light",
+ dark: "github-dark",
},
- transformers: [
- transformerNotationDiff(),
- ],
+ transformers: [transformerNotationDiff()],
})) as string
})
@@ -39,9 +37,7 @@ function CodeBlock(props: CodeBlockProps) {
}
})
- return (
- <div ref={containerRef} {...rest}></div>
- )
+ return <div ref={containerRef} {...rest}></div>
}
export default CodeBlock