1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

fix path Linux

This commit is contained in:
AWolf81
2019-05-30 09:10:04 -07:00
committed by Junyoung Choi
parent 38fcee35c2
commit ba6eb4f26f
4 changed files with 13 additions and 6 deletions

View File

@@ -45,6 +45,7 @@ const CSS_FILES = [
`${appPath}/node_modules/codemirror/lib/codemirror.css`,
`${appPath}/node_modules/react-image-carousel/lib/css/main.min.css`
]
const win = global.process.platform === 'win32'
function buildStyle (
fontFamily,
@@ -677,7 +678,9 @@ export default class MarkdownPreview extends React.Component {
GetCodeThemeLink (name) {
const theme = consts.THEMES.find(theme => theme.name === name)
return theme ? theme.path : `${appPath}/node_modules/codemirror/theme/elegant.css`
return theme
? (win ? theme.path : `../${theme.path}`)
: `${appPath}/node_modules/codemirror/theme/elegant.css`
}
rewriteIframe () {