Skip to content

Commit de71033

Browse files
authored
Merge pull request #2019 from yosmoc/fix_localfile_link
open local file by shell
2 parents 2c10bf2 + 166a5c1 commit de71033

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

browser/components/MarkdownPreview.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,6 @@ export default class MarkdownPreview extends React.Component {
532532
e.stopPropagation()
533533

534534
const href = e.target.href
535-
if (href.match(/^http/i)) {
536-
shell.openExternal(href)
537-
return
538-
}
539-
540535
const linkHash = href.split('/').pop()
541536

542537
const regexNoteInternalLink = /main.html#(.+)/
@@ -568,6 +563,9 @@ export default class MarkdownPreview extends React.Component {
568563
eventEmitter.emit('list:jump', linkHash.split('-')[1])
569564
return
570565
}
566+
567+
// other case
568+
shell.openExternal(href)
571569
}
572570

573571
render () {

0 commit comments

Comments
 (0)