fix: duplicated block ids in multiple files (#8668)

fix: duplicate block ids in multiple files
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
This commit is contained in:
Tienson Qin
2023-02-21 15:50:09 +08:00
committed by GitHub
parent 3372b3bfbd
commit 40ad524443
10 changed files with 93 additions and 30 deletions

View File

@@ -17,7 +17,7 @@
(defn extract-blocks
"Wrapper around logseq.graph-parser.block/extract-blocks that adds in system state
and handles unexpected failure."
[blocks content format {:keys [with-id?]
[blocks content format {:keys [with-id? page-name]
:or {with-id? true}}]
(try
(gp-block/extract-blocks blocks content with-id? format
@@ -25,7 +25,8 @@ and handles unexpected failure."
:block-pattern (config/get-block-pattern format)
:supported-formats (gp-config/supported-formats)
:db (db/get-db (state/get-current-repo))
:date-formatter (state/get-date-formatter)})
:date-formatter (state/get-date-formatter)
:page-name page-name})
(catch :default e
(log/error :exception e)
(state/pub-event! [:capture-error {:error e