DB: two forms of quote break export/paste round-trip (quote block vs. text starting with "> ")
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- markdown
- Domain
- backend
Research direction
Start with wrap-parse-block in frontend.handler.db-based.editor, which decides whether a leading > stays plain text, and with quote-content in logseq.common.export.file, which writes quote blocks. First settle which of the two forms is intended, since the fix depends on that choice. Done means an export/paste round-trip returns identical blocks for both forms, with a test covering each.
Written by the indexing model from the issue text.
Description
Exporting blocks as text and pasting that text back should give the same blocks. With quotes it cannot: a DB graph has two different kinds of block that both display as a quote, the text export writes both the same way (> some text), so pasting the export back has to turn one into the other. Whatever paste does, one of the two does not come back as itself.
The two forms
- A quote block: made with the quote command. It has
:logseq.property.node/display-type :quote, the tag#Quote(:logseq.class/Quote-block), and its text is stored without>. - A plain block whose text starts with
>: typing> some textin a block and leaving it keeps the text as is (wrap-parse-blockdoes not convert it), with no display type and no tag. It still renders as a quote: the block's text is parsed as- <title>, and mldoc reads- > some textas an empty title followed by aQuote.
They look the same but are different blocks: only the first has the #Quote tag and the display type (what a query on the tag, or anything checking the display type, sees).
By contrast, typing # some text in a block is converted on save: the # is removed and :logseq.property/heading 1 is set. So a heading has one form, and export/paste round-trips it; a quote has two, and export/paste cannot.
Which is intended?
- If
>at the start of a block should make a quote block (like#makes a heading), saving should convert it; the two forms become one, and export/paste round-trips quotes. - If
> some textis meant to stay text that renders as a quote, the two are different blocks, and the export has to write them differently. logseq/logseq#13721 does this by writing the plain form as\> some text(mldoc reads the backslash as an escape).
Checked on master: saving > quote keeps the title > quote with no display type (frontend.handler.db-based.editor/wrap-parse-block); quote-content in logseq.common.export.file writes a quote block as > lines; mldoc parses - > quote as an empty heading and a Quote.
- Dominant language
- No language data
- Stars
- 29
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from logseq/db-test
-
Web build on a phone: the fold arrow of an h1/h2 block lies on its bullet, so tapping the bullet folds instead of zooming inPossibly taken @tiensonqin claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedPossibly taken @RaphaelFakhri claimed this 19 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledPossibly taken @tiensonqin claimed this 22 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Similar issues
-
bot-found bug priority: P3
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
madenvel/KalinkaPlayer#543 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ynput/ayon-usd-resolver#117 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
🚨 Transformers v5.23.0 removes `ProcessingKwargs._defaults` which is used by Qwen-Omni / Gemma3Openquestion
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelscope/ms-swift#10538 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nautechsystems/nautilus_trader#5631 ·
Maintainers usually reply within 1 day