mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-16 03:06:27 +00:00
address requested changes - tag link & redundant line
This commit is contained in:
@@ -121,7 +121,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const regexIsTagLink = /^:tag:#([\w]+)$/
|
const regexIsTagLink = /^:tag:([\w]+)$/
|
||||||
if (regexIsTagLink.test(rawHref)) {
|
if (regexIsTagLink.test(rawHref)) {
|
||||||
const tag = rawHref.match(regexIsTagLink)[1]
|
const tag = rawHref.match(regexIsTagLink)[1]
|
||||||
eventEmitter.emit('dispatch:push', `/tags/${encodeURIComponent(tag)}`)
|
eventEmitter.emit('dispatch:push', `/tags/${encodeURIComponent(tag)}`)
|
||||||
@@ -142,8 +142,6 @@
|
|||||||
parser.href = rawHref
|
parser.href = rawHref
|
||||||
const { href, hash } = parser
|
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
|
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)
|
this.specialLinkHandler(target, rawHref, linkHash)
|
||||||
|
|||||||
Reference in New Issue
Block a user