@@ -489,40 +489,42 @@ function R_MarkDownContent(props: { content: string }) {
489489 } ,
490490 ] ,
491491 ] }
492- components = { {
493- pre : PreCode ,
494- code : CustomCode ,
495- p : ( pProps ) => < p { ...pProps } dir = "auto" /> ,
496- thinkcollapse : ( {
497- title,
498- children,
499- } : {
500- title : string ;
501- children : React . ReactNode ;
502- } ) => < ThinkCollapse title = { title } > { children } </ ThinkCollapse > ,
503- a : ( aProps ) => {
504- const href = aProps . href || "" ;
505- if ( / \. ( a a c | m p 3 | o p u s | w a v ) $ / . test ( href ) ) {
506- return (
507- < figure >
508- < audio controls src = { href } > </ audio >
509- </ figure >
510- ) ;
511- }
512- if ( / \. ( 3 g p | 3 g 2 | w e b m | o g v | m p e g | m p 4 | a v i ) $ / . test ( href ) ) {
513- return (
514- < video controls width = "99.9%" >
515- < source src = { href } />
516- </ video >
517- ) ;
518- }
519- const isInternal = / ^ \/ # / i. test ( href ) ;
520- const target = isInternal ? "_self" : ( aProps . target ?? "_blank" ) ;
521- return < a { ...aProps } target = { target } /> ;
522- } ,
523- details : Details ,
524- summary : Summary ,
525- } }
492+ components = {
493+ {
494+ pre : PreCode ,
495+ code : CustomCode ,
496+ p : ( pProps : any ) => < p { ...pProps } dir = "auto" /> ,
497+ thinkcollapse : ( {
498+ title,
499+ children,
500+ } : {
501+ title : string ;
502+ children : React . ReactNode ;
503+ } ) => < ThinkCollapse title = { title } > { children } </ ThinkCollapse > ,
504+ a : ( aProps : any ) => {
505+ const href = aProps . href || "" ;
506+ if ( / \. ( a a c | m p 3 | o p u s | w a v ) $ / . test ( href ) ) {
507+ return (
508+ < figure >
509+ < audio controls src = { href } > </ audio >
510+ </ figure >
511+ ) ;
512+ }
513+ if ( / \. ( 3 g p | 3 g 2 | w e b m | o g v | m p e g | m p 4 | a v i ) $ / . test ( href ) ) {
514+ return (
515+ < video controls width = "99.9%" >
516+ < source src = { href } />
517+ </ video >
518+ ) ;
519+ }
520+ const isInternal = / ^ \/ # / i. test ( href ) ;
521+ const target = isInternal ? "_self" : ( aProps . target ?? "_blank" ) ;
522+ return < a { ...aProps } target = { target } /> ;
523+ } ,
524+ details : Details ,
525+ summary : Summary ,
526+ } as any
527+ }
526528 >
527529 { escapedContent }
528530 </ ReactMarkdown >
0 commit comments