fix: Page and Tag with same name defaults to using Page

fixes https://github.com/logseq/db-test/issues/2
pull/11483/head
Tienson Qin 2024-08-13 21:54:29 +08:00
parent 046e81bb31
commit ce3503dd77
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@
chosen (:block/title chosen-result) chosen (:block/title chosen-result)
class? (and db-based? hashtag? class? (and db-based? hashtag?
(or (string/includes? chosen (str (t :new-tag) " ")) (or (string/includes? chosen (str (t :new-tag) " "))
(ldb/class? (db/get-page chosen)))) (ldb/class? chosen-result)))
chosen (-> chosen chosen (-> chosen
(string/replace-first (str (t :new-tag) " ") "") (string/replace-first (str (t :new-tag) " ") "")
(string/replace-first (str (t :new-page) " ") "")) (string/replace-first (str (t :new-page) " ") ""))