Markdown mirror: should it import back? (properties syntax, page tags and aliases)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- markdown
- Área
- tooling
Línea de trabajo
This is an open design question, so the first step is a maintainer decision between options 1A/1B and 2A/2B, not code. Read ADR 0016 and docs/logseq-markdown-syntax.md for the mirror's property format, then block-properties-content in logseq.common.export.file, which drops db-attribute-properties (:block/tags, :block/alias). Only after a choice is agreed would the importer in logseq.graph-parser and tests change.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Two questions about the Markdown mirror (ADR 0016) and Logseq's own Markdown importer, found by fuzzing the loop mirror → import as a file graph → compare blocks.
ADR 0016 says the mirror is for files that can be "read by external tools, backed up, indexed, or inspected outside Logseq", and also that it "is not a backup format with guaranteed import fidelity". The answers depend on where between those two the mirror should sit.
1. Should the importer read the mirror's property syntax?
The mirror writes properties as list items with * (ADR Markdown Content 5, docs/logseq-markdown-syntax.md):
- Ship it
* deadline:: Jan 1st, 2024
* rating:: 5
The file-graph importer (logseq.graph-parser) reads properties only in the file-graph form, deadline:: Jan 1st, 2024 without the * . With the * it reads a list item with text, so every property of every type (date, number, url, checkbox, choice, node, default) is lost on import, and the * key:: value text ends up in the block.
- A. Teach the importer that
* key:: valueis a property, so a mirror imports with its properties. - B. Leave it: the mirror is a readable copy, not something to import back.
2. How should the mirror write page tags and aliases?
Today the mirror writes neither (block-properties-content in logseq.common.export.file drops db-attribute-properties, which holds :block/tags and :block/alias, and the mirror adds tag tokens only to block lines). So a page tagged Book with alias Dorian has no trace of either in its file. Two ways to write them:
- A.
* tags:: [[Book]]and* alias:: [[Dorian]], the mirror's own property syntax (imports only with 1A). - B.
tags:: [[Book]]andalias:: [[Dorian]], the file-graph form, which the importer already reads.
Whichever you prefer, happy to send the PR 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
-
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 20 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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Todos los issues de logseq/db-test
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tomasz-tomczyk/crit#1159 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fullsend-ai/agents#1932 ·
Los mantenedores suelen responder en 1 día
-
status: ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
melodic-software/claude-code-plugins#15008 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
google/osv-scalibr#2630 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Project-N-E-K-O/N.E.K.O#3670 · 1 comentario ·
Los mantenedores suelen responder en 1 día