Serializer keeps a link open across a whitespace-only marked node
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- tooling
Línea de trabajo
Start in MarkdownSerializerState.renderInline and the expelEnclosingWhitespace step it relies on, since the issue traces the bug to renderInline setting marks = active for a whitespace-only marked node. Reproduce with the BaseSchemaSpecs, LinkSpecs and BoldSpecs setup from the issue and confirm the output drops the autolink. Done means the link is closed before the space is written, the serializer test prints the autolink followed by text, and a parsing regression test covers the round trip.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
MarkdownSerializerState.renderInline keeps the previous link active when the next node contains only marked whitespace.
Reproduce with BaseSchemaSpecs, LinkSpecs and BoldSpecs:
const href = 'https://ya.ru/';
const content = doc(p(a({href}, href), bold(' '), 'text'));
serializer.serialize(content);
Expected:
<https://ya.ru/> text
Actual:
<https://ya.ru/ >text
The result is not a valid autolink. After parsing, < and > become visible text.
When expelEnclosingWhitespace removes all text from the bold node, renderInline sets marks = active. This keeps the previous link open while writing the space, although the original space node has no link mark.
Close marks absent from the original node before writing its whitespace. Add regression tests for serialization and parsing.
- Lenguaje dominante
- TypeScript
- Estrellas
- 428
- Forks
- 48
- Merge medio
- 5 d 15 h
- PR fusionados (30 d)
- 47
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 gravity-ui/markdown-editor
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
gravity-ui/markdown-editor#1452 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gravity-ui/markdown-editor#1293 ·
Los mantenedores suelen responder en 1 día
-
Markup mode: `colorify` does not detect existing `{color}(...)` wrapper when switching colorsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
gravity-ui/markdown-editor#1129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
gravity-ui/markdown-editor#1450 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
gravity-ui/markdown-editor#1331 ·
Los mantenedores suelen responder en 1 día
Todos los issues de gravity-ui/markdown-editor
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
tintinweb/pi-subagents#459 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
danielmiessler/LifeOS#2830 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
freshframework/fresh#3920 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area: client enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
opensro-dev/opensro#3681 ·
Los mantenedores suelen responder en 1 día