mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
address requested changes - tag link & redundant line
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
const regexIsTagLink = /^:tag:#([\w]+)$/
|
||||
const regexIsTagLink = /^:tag:([\w]+)$/
|
||||
if (regexIsTagLink.test(rawHref)) {
|
||||
const tag = rawHref.match(regexIsTagLink)[1]
|
||||
eventEmitter.emit('dispatch:push', `/tags/${encodeURIComponent(tag)}`)
|
||||
@@ -142,8 +142,6 @@
|
||||
parser.href = rawHref
|
||||
const { href, hash } = parser
|
||||
|
||||
if (!rawHref) return // not checked href because parser will create file://... string for [empty link]()
|
||||
|
||||
const linkHash = hash === '' ? rawHref : hash // needed because we're having special link formats that are removed by parser e.g. :line:10
|
||||
|
||||
this.specialLinkHandler(target, rawHref, linkHash)
|
||||
|
||||
Reference in New Issue
Block a user