Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced query import loses line breaks and other whitespace #193

Open
1 of 2 tasks
paulrudy opened this issue Dec 18, 2024 · 1 comment
Open
1 of 2 tasks

Advanced query import loses line breaks and other whitespace #193

paulrudy opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working import

Comments

@paulrudy
Copy link

Search first

  • I searched and no similar issues were found

What Happened?

Importing advanced queries with multiple lines and whitespace formatting from the MD version results in the query being displayed in a single line in the DB version.

Reproduce the Bug

  1. Create an advanced query in a graph in the MD version
  2. Import the graph to the DB version
  3. View the imported advanced query

Expected Behavior

Query should be displayed either:

  • in its original formatting (multi-line, whitespace preserved)
  • with (multi-line, whitespace indents) formatting automatically applied by Logseq.

Files

No response

Browser, Desktop or Mobile Platform Information

MacOS 15.2, db test version 0.10.10, Firefox browser

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)
@geosmina
Copy link

geosmina commented Dec 18, 2024

Here's an example.

#+BEGIN_QUERY
{
 :title "⌛ Nesse dia..."
    :query [:find (pull ?b [*])
       :in $ ?today
       :where
       [?b :block/page ?p]
       [?p :page/journal? true]
       [?p :page/journal-day ?jd]     
       [(str ?jd) ?jds]     
       [(subs ?jds 4 8) ?md1]
       [(str ?today) ?td]
       [(subs ?td 4 8) ?md2]
       [(= ?md1 ?md2)]
       [(< ?jd ?today)]
    ]
    :inputs [:today]
    :breadcrumb-show? true
    :collapsed? False
}
 #+END_QUERY

This query renders to:
example_query

P.S. I don't know if queries in the old format still work, but this exact query doesn't work for me anymore. There's no data in the resulting table.

@logseq-cldwalker logseq-cldwalker added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working import
Projects
None yet
Development

No branches or pull requests

3 participants