Skip to content

Commit 3bf78ac

Browse files
fix(regression): built-in pages can be turned into tags
Removing this check in 6f8d2a3 reintroduced logseq/db-test#333. To reproduce, use a built-in page as an inline tag. For example, type 'o1 #Library' in a block and then press escape
1 parent b57e10d commit 3bf78ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deps/outliner/src/logseq/outliner/core.cljs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@
327327
(:block/title m*)
328328
(not= (:block/title m*) (:block/title block-entity)))
329329
(outliner-validate/validate-block-title db (:block/title m*) block-entity))
330+
_ (when (and db-based? (seq (:block/tags m*)))
331+
;; Add built-in? b/c it's not available here
332+
(doseq [tag (map #(assoc % :logseq.property/built-in?
333+
(contains? sqlite-create-graph/built-in-pages-names (:block/title %))) (:block/tags m*))]
334+
(outliner-validate/validate-built-in-pages tag {:message "Built-in page can't be a tag"})))
330335
m (cond-> m*
331336
db-based?
332337
(dissoc :block/format :block/pre-block? :block/priority :block/marker :block/properties-order))]

0 commit comments

Comments
 (0)