mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
refactor: DRY up spread out definition of db's
namespace/parent feature. Following up to #11517, provide vars so it's clear how a feature is used and coupled throughout the codebase
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
[frontend.util.text :as text-util]
|
||||
[goog.userAgent]
|
||||
[frontend.db.async :as db-async]
|
||||
[logseq.db :as ldb]))
|
||||
[logseq.db :as ldb]
|
||||
[logseq.common.util.namespace :as ns-util]))
|
||||
|
||||
(defn translate [t {:keys [id desc]}]
|
||||
(when id
|
||||
@@ -106,7 +107,7 @@
|
||||
(take 5 items))))
|
||||
node-exists? (let [blocks-result (keep :source-block (get-in results [:nodes :items]))]
|
||||
(when-not (string/blank? input)
|
||||
(or (some-> (last (string/split input "/"))
|
||||
(or (some-> (last (string/split input ns-util/parent-char))
|
||||
string/trim
|
||||
db/get-page)
|
||||
(some (fn [block]
|
||||
|
||||
Reference in New Issue
Block a user