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

Make it work on windows

This commit is contained in:
asmsuechan
2017-07-26 15:47:38 +09:00
parent e86464535d
commit 9034b3ab54

View File

@@ -285,7 +285,7 @@ export default class MarkdownPreview extends React.Component {
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('img'), (el) => {
if (!/\/:storage/.test(el.src)) return
el.src = el.src.replace('/:storage', path.join(storagePath, 'images'))
el.src = `file:///${path.join(storagePath, 'images', path.basename(el.src))}`
})
codeBlockTheme = consts.THEMES.some((_theme) => _theme === codeBlockTheme)