Tags can't have '#'

Resolved https://github.com/logseq/logseq/issues/277
pull/645/head
Tienson Qin 2020-09-06 09:24:19 +08:00
parent 98116d0116
commit da80086e48
2 changed files with 3 additions and 1 deletions

View File

@ -1351,7 +1351,8 @@
(if (= k :tags)
(let [tag (-> item
(string/replace "[" "")
(string/replace "]" ""))]
(string/replace "]" "")
(string/replace "#" ""))]
[:a.tag.mr-1 {:href (str "/page/" tag)}
tag])
[:span item]))

View File

@ -782,6 +782,7 @@
(let [tag (-> (string/trim tag)
(string/lower-case)
(string/replace #"\s+" "-")
(string/replace #"#" "")
(string/replace "[" "")
(string/replace "]" ""))]
(if (tag-valid? tag)