DB: two forms of quote break export/paste round-trip (quote block vs. text starting with "> ")
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- markdown
- Área
- backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 29
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de 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 inPosiblemente ocupada @tiensonqin la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedPosiblemente ocupada @RaphaelFakhri la tomó hace 19 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledPosiblemente ocupada @tiensonqin la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Todos los issues de logseq/db-test
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Azure/azure-functions-nodejs-extensions#180 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
tidyverse/ellmer#1226 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
cli: `studio --request <missing file>` answers with a raw ENOENT/EISDIR instead of a clear errorAbiertobug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
laaielichter/Ai-edit-studio#81 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
jasonacox/pypowerwall#472 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
sebastienros/jint#4531 ·
Los mantenedores suelen responder en 1 día