DB: text export expands a deprecated {{embed [[page]]}} macro into the page's content
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The expansion happens in replace-block&page-embeds in frontend.handler.export.common-impl, and the three assertions to revisit are in frontend.handler.export-test (export-blocks-as-markdown-without-properties, export-blocks-as-markdown-newline-after-block, export-blocks-as-markdown-level<N>). Before changing code, a maintainer needs to decide whether DB graphs should keep expansion (B) or write the macro as text (A); the issue has no decision yet. If A is chosen, done means export and paste round-trip a block with an embed macro unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In a DB graph, a block whose text contains the file-graph embed macro, e.g.
Groceries {{embed [[Shopping]]}}
is shown as "Groceries" and the deprecated-macro warning (frontend.components.block, :block.macro/embed-deprecated); the Shopping page's blocks are not shown. DB embeds are :block/link blocks made with the embed command.
Exporting that block as text (Copy as / Export as Markdown) writes the Shopping page's blocks in place of the macro:
- Groceries
- milk
- eggs
So the export contains content the block does not show, and pasting the export back gives three blocks instead of the one block. If the embedded page is empty, the macro disappears from the export without a trace (- Groceries).
The expansion is done by replace-block&page-embeds in frontend.handler.export.common-impl (code from file graphs, where the macro did show the page). Three tests in frontend.handler.export-test assert it for the text export: export-blocks-as-markdown-without-properties, export-blocks-as-markdown-newline-after-block, export-blocks-as-markdown-level<N.
Which is intended for DB graphs?
- A. The text export writes the macro as text (
- Groceries {{embed [[Shopping]]}}), the way the block shows it; export and paste give back the same block. Those three tests change. - B. The text export keeps expanding the macro, as now.
Found by fuzzing export as text → paste. Happy to send the PR for A with tests.
- 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 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Todos los issues de logseq/db-test
Issues similares
-
code-quality good-first-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenRailAssociation/netzgrafik-editor-frontend#1481 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
seek4science/seek#2784 ·
Los mantenedores suelen responder en 2 días
-
area-clientside-dartpad
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
SACGF/variantgrid#2737 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug frontend ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día