diff --git a/package.json b/package.json index 3f8c0dbd4a8..ed5e66b3050 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "gulp-cached": "^1.1.1", "ignore": "^5.1.8", "jszip": "^3.5.0", - "mldoc": "0.5.5", + "mldoc": "0.5.6", "mousetrap": "^1.6.5", "path": "^0.12.7", "react": "^17.0.1", diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index 05775b887d5..3bafe790d48 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -572,22 +572,19 @@ ["Subscript" l] (->elem :sub (map-inline config l)) ["Tag" s] - (if (and s (util/tag-valid? s)) - [:a.tag {:data-ref s - :href (rfe/href :page {:name s}) - :on-click (fn [e] - (let [repo (state/get-current-repo) - page (db/pull repo '[*] [:page/name (string/lower-case (util/url-decode s))])] - (when (gobj/get e "shiftKey") - (state/sidebar-add-block! - repo - (:db/id page) - :page - {:page page}) - (.preventDefault e))))} - (str "#" s)] - [:span.warning.mr-1 {:title "Invalid tag, tags only accept alphanumeric characters, \"-\", \"_\", \"@\" and \"%\"."} - (str "#" s)]) + [:a.tag {:data-ref s + :href (rfe/href :page {:name s}) + :on-click (fn [e] + (let [repo (state/get-current-repo) + page (db/pull repo '[*] [:page/name (string/lower-case (util/url-decode s))])] + (when (gobj/get e "shiftKey") + (state/sidebar-add-block! + repo + (:db/id page) + :page + {:page page}) + (.preventDefault e))))} + (str "#" s)] ["Emphasis" [[kind] data]] (let [elem (case kind "Bold" :b diff --git a/yarn.lock b/yarn.lock index 87692e5c7ed..9ef37fa5216 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3853,10 +3853,10 @@ mkdirp@^0.5.4, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" -mldoc@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-0.5.5.tgz#cb7eea471adc94e1c7858d4ae772ddabe0a75753" - integrity sha512-acseZvvwzLNlvp6/fZzqP5rqS80keWOK1XCreem5eXJNxLtJm+xIqzEJVcsmeyFS1Leya1gPT7dMcCUOhEr26g== +mldoc@0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-0.5.6.tgz#aa4351791e11b9c8a8df359a9d87619d7ff02e5d" + integrity sha512-iRTuTmLUdR8OKiRrrM4dl+51jxAmOJ92+B3rsYuKZERaYcU0B9jiJBT9S2nDZldARNEwjhj8DKITdnJZMxArGQ== dependencies: yargs "^12.0.2"