Skip to content

DB: two forms of quote break export/paste round-trip (quote block vs. text starting with "> ") #1439

Open

Description

@yuxi-liu-wired

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

  1. 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 >.
  2. A plain block whose text starts with > : typing > some text in a block and leaving it keeps the text as is (wrap-parse-block does 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 text as an empty title followed by a Quote.

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 text is meant to stay text that renders as a quote, the two are different blocks, and the export has to write them differently. fix(export): keep backslash escapes at the start of a line 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.

Activity

  1. changed the title [-]DB: two forms of quote (quote block vs. text starting with "> "), which is intended?[/-] [+]DB: two forms of quote break export/paste round-trip (quote block vs. text starting with "> ")[/+] on Oct 13, 2026
  2. transferred this issue fromlogseq/logseqon Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions