File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,19 @@ import { PythonEmbeddedTerminal } from "../terminal/python/embedded";
55import { Heading } from "./section" ;
66import { type AceLang , EditorComponent } from "../terminal/editor" ;
77import { ExecFile , ExecLang } from "../terminal/exec" ;
8+ import { ChangeTheme } from "./themeToggle" ;
89import { tomorrow } from "react-syntax-highlighter/dist/esm/styles/hljs" ;
10+ import { twilight } from "react-syntax-highlighter/dist/esm/styles/prism" ;
911
1012export function StyledMarkdown ( { content } : { content : string } ) {
11- const syntaxtheme = ChangeTheme ( ) === "twilight" ? vscDarkPlus : prism ;
13+ const syntaxtheme = ChangeTheme ( ) === "twilight" ? tomorrow : twilight ;
14+ return (
15+ < Markdown remarkPlugins = { [ remarkGfm ] } components = { components } >
16+ { content }
17+ </ Markdown >
18+ ) ;
19+ }
20+
1221
1322// TailwindCSSがh1などのタグのスタイルを消してしまうので、手動でスタイルを指定する必要がある
1423const components : Components = {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export function EditorComponent(props: EditorProps) {
8787 < AceEditor
8888 name = { `ace-editor-${ props . filename } ` }
8989 mode = { props . language }
90- theme = "tomorrow" // TODO dark theme (twilightがいいんじゃないかと勝手に思っている)
90+ theme = { ChangeTheme ( ) }
9191 tabSize = { props . tabSize }
9292 width = "100%"
9393 height = {
You can’t perform that action at this time.
0 commit comments