@@ -19,7 +19,6 @@ const LANG_ALIASES: Record<string, string> = {
1919 text : 'plaintext' ,
2020}
2121
22-
2322// Lazy highlighter singleton
2423let highlighterPromise : Promise < HighlighterGeneric < any , any > > | null = null
2524let mermaidInstance : Mermaid | null = null
@@ -91,10 +90,10 @@ function extractPreAttributes(html: string): {
9190}
9291
9392export function CodeBlock ( {
94- isEmbedded,
95- showTypeCopyButton = true ,
96- ...props
97- } : React . HTMLProps < HTMLPreElement > & {
93+ isEmbedded,
94+ showTypeCopyButton = true ,
95+ ...props
96+ } : React . HTMLProps < HTMLPreElement > & {
9897 isEmbedded ?: boolean
9998 showTypeCopyButton ?: boolean
10099} ) {
@@ -107,10 +106,10 @@ export function CodeBlock({
107106 const children = props . children as
108107 | undefined
109108 | {
110- props : {
111- children : string
112- }
113- }
109+ props : {
110+ children : string
111+ }
112+ }
114113
115114 const [ copied , setCopied ] = React . useState ( false )
116115 const ref = React . useRef < any > ( null )
@@ -131,7 +130,7 @@ export function CodeBlock({
131130
132131 React [
133132 typeof document !== 'undefined' ? 'useLayoutEffect' : 'useEffect'
134- ] ( ( ) => {
133+ ] ( ( ) => {
135134 ; ( async ( ) => {
136135 const themes = [ 'github-light' , 'tokyo-night' ]
137136 const normalizedLang = LANG_ALIASES [ lang ] || lang
@@ -228,4 +227,4 @@ export function CodeBlock({
228227 { codeElement }
229228 </ div >
230229 )
231- }
230+ }
0 commit comments