File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,9 +52,12 @@ const code = rows.map((row) => row.code).join('');
5252// Convert it to HTML with style tags
5353const html = await codeToHtml (code , {
5454 lang: props .lang || ' javascript' ,
55- theme: props .theme || ' github-light' ,
55+ theme: props .theme || ' github-light-high-contrast ' ,
5656})
5757
58+ console .log (" Shiki theme in use:" , props .theme || ' github-light-high-contrast' );
59+ console .log (html .slice (0 , 300 ));
60+
5861// Turn it into a DOM tree we can query
5962const parsed = new JSDOM (html )
6063const dom = parsed .window .document
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import { CodeFrame } from "./frame";
88import { CopyCodeButton } from "../CopyCodeButton" ;
99import CircleButton from "../CircleButton" ;
1010import { Icon } from "../Icon" ;
11+ import { githubLightHighContrast } from '@uiw/codemirror-theme-github' ;
12+
1113/*
1214 * A more featured code embed component that uses CodeMirror
1315 *
@@ -123,7 +125,7 @@ export const CodeEmbed = (props) => {
123125 < div className = "code-editor-container relative w-full" >
124126 < CodeMirror
125127 value = { codeString }
126- theme = "light"
128+ theme = { githubLightHighContrast }
127129 width = "100%"
128130 minimalSetup = { {
129131 highlightSpecialChars : false ,
You can’t perform that action at this time.
0 commit comments