1
0
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:
AWolf81
2020-03-03 07:29:22 +01:00
committed by Junyoung Choi
parent 2695f62f3e
commit 4d5939aaf4

View File

@@ -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)