mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
open local file by shell
This commit is contained in:
@@ -526,11 +526,6 @@ export default class MarkdownPreview extends React.Component {
|
||||
e.stopPropagation()
|
||||
|
||||
const href = e.target.href
|
||||
if (href.match(/^http/i)) {
|
||||
shell.openExternal(href)
|
||||
return
|
||||
}
|
||||
|
||||
const linkHash = href.split('/').pop()
|
||||
|
||||
const regexNoteInternalLink = /main.html#(.+)/
|
||||
@@ -562,6 +557,9 @@ export default class MarkdownPreview extends React.Component {
|
||||
eventEmitter.emit('list:jump', linkHash.split('-')[1])
|
||||
return
|
||||
}
|
||||
|
||||
// other case
|
||||
shell.openExternal(href)
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
Reference in New Issue
Block a user