1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

open local file by shell

This commit is contained in:
yosmoc
2018-05-29 21:23:19 +02:00
parent ca0b03e97c
commit 166a5c10a7

View File

@@ -526,11 +526,6 @@ export default class MarkdownPreview extends React.Component {
e.stopPropagation() e.stopPropagation()
const href = e.target.href const href = e.target.href
if (href.match(/^http/i)) {
shell.openExternal(href)
return
}
const linkHash = href.split('/').pop() const linkHash = href.split('/').pop()
const regexNoteInternalLink = /main.html#(.+)/ const regexNoteInternalLink = /main.html#(.+)/
@@ -562,6 +557,9 @@ export default class MarkdownPreview extends React.Component {
eventEmitter.emit('list:jump', linkHash.split('-')[1]) eventEmitter.emit('list:jump', linkHash.split('-')[1])
return return
} }
// other case
shell.openExternal(href)
} }
render () { render () {