mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
Finish migration block ns to nbb
This commit is contained in:
@@ -266,7 +266,7 @@
|
||||
(if (and (:block/pre-block? block)
|
||||
(seq (:block/properties block)))
|
||||
(let [page-properties (:block/properties block)
|
||||
str->page (fn [n] (gp-block/page-name->map n true))
|
||||
str->page (fn [n] (block/page-name->map n true))
|
||||
refs (->> page-properties
|
||||
(filter (fn [[_ v]] (coll? v)))
|
||||
(vals)
|
||||
@@ -670,7 +670,9 @@
|
||||
(defn properties-block
|
||||
[properties format page]
|
||||
(let [content (property/insert-properties format "" properties)
|
||||
refs (gp-block/get-page-refs-from-properties properties)]
|
||||
refs (gp-block/get-page-refs-from-properties properties
|
||||
(db/get-db (state/get-current-repo))
|
||||
(state/get-date-formatter))]
|
||||
{:block/pre-block? true
|
||||
:block/uuid (db/new-block-id)
|
||||
:block/properties properties
|
||||
@@ -1946,7 +1948,7 @@
|
||||
content* (str (if (= :markdown format) "- " "* ")
|
||||
(property/insert-properties format content props))
|
||||
ast (mldoc/->edn content* (gp-mldoc/default-config format))
|
||||
blocks (gp-block/extract-blocks ast content* true format)
|
||||
blocks (block/extract-blocks ast content* true format)
|
||||
fst-block (first blocks)]
|
||||
(assert fst-block "fst-block shouldn't be nil")
|
||||
(assoc fst-block :block/level (:block/level block)))))))
|
||||
@@ -2853,7 +2855,7 @@
|
||||
[format text]
|
||||
(when-let [editing-block (state/get-edit-block)]
|
||||
(let [page-id (:db/id (:block/page editing-block))
|
||||
blocks (gp-block/extract-blocks
|
||||
blocks (block/extract-blocks
|
||||
(mldoc/->edn text (gp-mldoc/default-config format)) text true format)
|
||||
blocks' (block/with-parent-and-left page-id blocks)]
|
||||
(paste-blocks blocks' {}))))
|
||||
|
||||
Reference in New Issue
Block a user