File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -677,11 +677,7 @@ export default class MarkdownPreview extends React.Component {
677
677
GetCodeThemeLink ( name ) {
678
678
const theme = consts . THEMES . find ( theme => theme . name === name )
679
679
680
- if ( theme ) {
681
- return `${ appPath } /${ theme . path } `
682
- } else {
683
- return `${ appPath } /node_modules/codemirror/theme/elegant.css`
684
- }
680
+ return theme ? theme . path : `${ appPath } /node_modules/codemirror/theme/elegant.css`
685
681
}
686
682
687
683
rewriteIframe ( ) {
Original file line number Diff line number Diff line change @@ -110,7 +110,6 @@ function validate (config) {
110
110
}
111
111
112
112
function _save ( config ) {
113
- console . log ( config )
114
113
window . localStorage . setItem ( 'config' , JSON . stringify ( config ) )
115
114
}
116
115
@@ -143,7 +142,7 @@ function get () {
143
142
const theme = consts . THEMES . find ( theme => theme . name === config . editor . theme )
144
143
145
144
if ( theme ) {
146
- editorTheme . setAttribute ( 'href' , `../ ${ theme . path } ` )
145
+ editorTheme . setAttribute ( 'href' , theme . path )
147
146
} else {
148
147
config . editor . theme = 'default'
149
148
}
@@ -191,7 +190,7 @@ function set (updates) {
191
190
const newTheme = consts . THEMES . find ( theme => theme . name === newConfig . editor . theme )
192
191
193
192
if ( newTheme ) {
194
- editorTheme . setAttribute ( 'href' , `../ ${ newTheme . path } ` )
193
+ editorTheme . setAttribute ( 'href' , newTheme . path )
195
194
}
196
195
197
196
ipcRenderer . send ( 'config-renew' , {
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ class UiTab extends React.Component {
135
135
const theme = consts . THEMES . find ( theme => theme . name === newCodemirrorTheme )
136
136
137
137
if ( theme ) {
138
- checkHighLight . setAttribute ( 'href' , `../ ${ theme . path } ` )
138
+ checkHighLight . setAttribute ( 'href' , theme . path )
139
139
}
140
140
}
141
141
You can’t perform that action at this time.
0 commit comments