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

@@ -41,4 +41,14 @@
:breadcrumb-show? true
:collapsed? False
}
#+END_QUERY
#+END_QUERY
- Get all tasks with a tag "project"
#+BEGIN_SRC clojure
#+BEGIN_QUERY
{:title "All blocks with tag project"
:query [:find (pull ?b [*])
:where
[?p :block/name "project"]
[?b :block/refs ?p]]}
#+END_QUERY
#+END_SRC