@@ -6,8 +6,7 @@ import { Heading } from "./section";
66import { type AceLang , EditorComponent } from "../terminal/editor" ;
77import { ExecFile , ExecLang } from "../terminal/exec" ;
88import { useChangeTheme } from "./themeToggle" ;
9- import { tomorrow } from "react-syntax-highlighter/dist/esm/styles/hljs" ;
10- import { twilight } from "react-syntax-highlighter/dist/esm/styles/prism" ;
9+ import { tomorrow , atomOneDark } from "react-syntax-highlighter/dist/esm/styles/hljs" ;
1110
1211export function StyledMarkdown ( { content } : { content : string } ) {
1312 return (
@@ -36,7 +35,7 @@ const components: Components = {
3635 li : ( { node, ...props } ) => < li className = "my-1" { ...props } /> ,
3736 a : ( { node, ...props } ) => < a className = "link link-info" { ...props } /> ,
3837 strong : ( { node, ...props } ) => (
39- < strong className = "text-primary" { ...props } />
38+ < strong className = "text-primary dark:text-secondary " { ...props } />
4039 ) ,
4140 table : ( { node, ...props } ) => (
4241 < div className = "w-max max-w-full overflow-x-auto mx-auto my-2 rounded-lg border border-base-content/5 shadow-sm" >
@@ -49,7 +48,7 @@ const components: Components = {
4948} ;
5049function CodeComponent ( { node, className, ref, style, ...props } : { node : unknown ; className ?: string ; ref ?: unknown ; style ?: unknown ; [ key : string ] : unknown } ) {
5150 const theme = useChangeTheme ( ) ;
52- const codetheme = theme === "tomorrow" ? tomorrow : twilight ;
51+ const codetheme = theme === "tomorrow" ? tomorrow : atomOneDark ;
5352 const match = / ^ l a n g u a g e - ( \w + ) ( - r e p l | - e x e c | - r e a d o n l y ) ? \: ? ( .+ ) ? $ / . exec (
5453 className || ""
5554 ) ;
0 commit comments