1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

change tag link format to :tag:tag

This commit is contained in:
AWolf81
2020-02-25 08:16:52 +01:00
parent e55f1e0308
commit 2b4e2638dc

View File

@@ -1161,7 +1161,7 @@ class MarkdownPreview extends React.Component {
return
}
const regexIsTagLink = /^:tag:#([\w]+)$/
const regexIsTagLink = /^:tag:([\w]+)$/
if (regexIsTagLink.test(rawHref)) {
const tag = rawHref.match(regexIsTagLink)[1]
dispatch(push(`/tags/${encodeURIComponent(tag)}`))