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:
@@ -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 () {
|
||||||
|
|||||||
Reference in New Issue
Block a user