Long code block in query results are rendered strangely
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 45k
- Forks
- 2.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 105
Description
**Describe the bug**
Long code block in query results are rendered strangely.
There is one page with very long code block, I query a single line in that code block and toggle the `table view`, the query result intend to display all the code in one line.
**To Reproduce**
Steps to reproduce the behavior:
1. open some new page A.
2. add one long code block in A. (this code contains a piece of code like `foo_bar`)
3. open some new page B.
4. add `{{query foo_bar}}` in B
5. You can see a long code in fence right, then toggle `Table view`, this long code block from A will be collapsed into one line.
**Expected behavior**
If possible, every line in a "fenced code block" should be treated as one unit.
At least, the query should not return too many lines of one large code block.
This "code query" thing could be a great feature for promoting logseq, imho.
**Screenshots**


**Desktop (please complete the following information):**
- OS: Windows 10
- Browser - (using win10 desktop version)
- Version Logseq-win-x64-0.5.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with two pages, a long fenced code block, a single-line query, and the Table view toggle. Trace the query-results rendering entry point from that reproduction; done means fenced code is grouped or displayed without collapsing the block into an excessive single-line result, with a regression test if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100