File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,10 +170,10 @@ export default class MarkdownPreview extends React.Component {
170170 }
171171
172172 setCodeTheme ( theme ) {
173- const pathToCss = consts . THEMES . some ( ( _theme ) => _theme === theme )
174- ? ` theme/ ${ theme } .css`
175- : 'lib/codemirror.css '
176- this . getWindow ( ) . document . getElementById ( 'codeTheme' ) . href = `${ appPath } /node_modules/codemirror/${ pathToCss } `
173+ theme = consts . THEMES . some ( ( _theme ) => _theme === theme )
174+ ? theme
175+ : 'default '
176+ this . getWindow ( ) . document . getElementById ( 'codeTheme' ) . href = `${ appPath } /node_modules/codemirror/theme/ ${ theme } .css `
177177 }
178178
179179 rewriteIframe ( ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const consts = {
3030 'Dodger Blue' ,
3131 'Violet Eggplant'
3232 ] ,
33- THEMES : themes ,
33+ THEMES : [ 'default' ] . concat ( themes )
3434}
3535
3636module . exports = consts
You can’t perform that action at this time.
0 commit comments