11import Markdown , { Components } from "react-markdown" ;
22import remarkGfm from "remark-gfm" ;
3- import { Prism as SyntaxHighlighter } from "react-syntax-highlighter" ;
3+ import SyntaxHighlighter from "react-syntax-highlighter" ;
44import { PythonEmbeddedTerminal } from "../terminal/python/embedded" ;
55import { Heading } from "./section" ;
66import { AceLang , EditorComponent } from "../terminal/editor" ;
77import { ExecFile , ExecLang } from "../terminal/exec" ;
8+ import { tomorrow } from "react-syntax-highlighter/dist/esm/styles/hljs" ;
89
910export function StyledMarkdown ( { content } : { content : string } ) {
1011 return (
@@ -138,8 +139,8 @@ const components: Components = {
138139 < SyntaxHighlighter
139140 language = { match [ 1 ] }
140141 PreTag = "div"
141- className = "border border-base-300 mx-2 my-2 rounded-lg text-sm! m-2! p-4!"
142- // style={todo dark theme?}
142+ className = "border border-base-content/50 mx-2 my-2 rounded-lg text-sm p-4!"
143+ style = { tomorrow } // todo dark theme (editor.tsx で指定したのと同じテーマを選ぶようにすること)
143144 { ...props }
144145 >
145146 { String ( props . children || "" ) . replace ( / \n $ / , "" ) }
@@ -150,8 +151,8 @@ const components: Components = {
150151 return (
151152 < SyntaxHighlighter
152153 PreTag = "div"
153- className = "border border-base-300 mx-2 my-2 rounded-lg text-sm! m-2! p-4!"
154- // style={todo dark theme?}
154+ className = "border border-base-content/50 mx-2 my-2 rounded-lg text-sm p-4!"
155+ style = { tomorrow } // todo dark theme
155156 { ...props }
156157 >
157158 { String ( props . children || "" ) . replace ( / \n $ / , "" ) }
0 commit comments