File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import rehypeHighlight from 'rehype-highlight';
66import rehypeSanitize , { defaultSchema } from 'rehype-sanitize' ;
77import { useSettingsStore } from '@state/settings' ;
88import 'katex/dist/katex.min.css' ;
9- import 'highlight.js/styles/github-dark.css' ;
109
1110interface MarkdownViewProps {
1211 text : string ;
@@ -16,7 +15,16 @@ interface MarkdownViewProps {
1615export default function MarkdownView ( { text, className } : MarkdownViewProps ) {
1716 const { markdownEnabled, katexEnabled, imageMaxWidthPx } = useSettingsStore ( ) ;
1817 if ( ! markdownEnabled ) {
19- return < pre className = { className } > { text } </ pre > ;
18+ return (
19+ < div className = { `md ${ className ?? '' } ` } >
20+ < div className = "code-block" >
21+ < div className = "code-lang" > text</ div >
22+ < pre >
23+ < code > { text } </ code >
24+ </ pre >
25+ </ div >
26+ </ div >
27+ ) ;
2028 }
2129 // Preserve math classes through sanitization so rehype-katex can detect them.
2230 const sanitizeOptions : any = {
You can’t perform that action at this time.
0 commit comments