diff --git a/browser/components/MarkdownPreview.js b/browser/components/MarkdownPreview.js index 7a1f6815..5cc4eca8 100644 --- a/browser/components/MarkdownPreview.js +++ b/browser/components/MarkdownPreview.js @@ -170,10 +170,10 @@ export default class MarkdownPreview extends React.Component { } setCodeTheme (theme) { - theme = consts.THEMES.some((_theme) => _theme === theme) - ? theme - : 'default' - this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css` + const pathToCss = consts.THEMES.some((_theme) => _theme === theme) + ? `theme/${theme}.css` + : 'lib/codemirror.css' + this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/${pathToCss}` } rewriteIframe () { diff --git a/browser/lib/consts.js b/browser/lib/consts.js index 253bc974..fe108fd1 100644 --- a/browser/lib/consts.js +++ b/browser/lib/consts.js @@ -30,7 +30,7 @@ const consts = { 'Dodger Blue', 'Violet Eggplant' ], - THEMES: ['default'].concat(themes) + THEMES: themes, } module.exports = consts