fix: use ast blocks for advanced queries conversion

Fixes cases where BEGIN_QUERY nested in BEGIN_SRC were incorrectly
being converted to queries e.g. most queries in
https://docs.logseq.com/#/page/advanced%20queries
This commit is contained in:
Gabriel Horner
2025-06-19 17:03:02 -04:00
committed by Tienson Qin
parent 507ff3ce29
commit cc05518ea5
3 changed files with 62 additions and 46 deletions

View File

@@ -396,10 +396,10 @@
:logseq.property/query "{:query (task todo doing)}"
:block/tags [:logseq.class/Query]
:logseq.property.table/ordered-columns [:block/title]}
(db-test/readable-properties (db-test/find-block-by-content @conn #"tasks with")))
(db-test/readable-properties (db-test/find-block-by-content @conn #"tasks with todo")))
"Advanced query has correct query properties")
(is (= "tasks with todo and doing"
(:block/title (db-test/find-block-by-content @conn #"tasks with")))
(:block/title (db-test/find-block-by-content @conn #"tasks with todo")))
"Advanced query has custom title migrated")
;; Cards