mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 15:15:01 +00:00
fix: don't extract and display misleading warnings
in display-type blocks. Was able to reproduce the issue in :code, :quote and :math blocks. Fixes logseq/db-test#128.
This commit is contained in:
@@ -78,7 +78,12 @@ and handles unexpected failure."
|
||||
format (or format :markdown)
|
||||
parse-config (mldoc/get-default-config format)
|
||||
ast (format/to-edn title format parse-config)
|
||||
blocks (extract-blocks ast title format {:parse-block block})
|
||||
;; Disable extraction for display-type blocks as there isn't a reason to have
|
||||
;; it enabled yet and can cause visible bugs when '#' is used
|
||||
blocks (if (and (config/db-based-graph? (state/get-current-repo))
|
||||
(:logseq.property.node/display-type block))
|
||||
[block]
|
||||
(extract-blocks ast title format {:parse-block block}))
|
||||
new-block (first blocks)
|
||||
block (cond->
|
||||
(merge block new-block)
|
||||
|
||||
Reference in New Issue
Block a user