Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

read: two hard breaks in a row become a paragraph break

Abierto
#213 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Start with the named renderInlineRun, renderMark, renderCellLines, and heading substitutions, then reproduce the two-consecutive-break examples on main. Ensure later breaks in a run use the backslash-plus-newline spelling consistently, including marked, cell, and heading cases, so publishing keeps one paragraph and preserves both breaks.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Two hard breaks in a row read back as a paragraph break. Found while working on #204; reproduced on main:

storage read writes publish sends
<p>a<br /><br />b</p> a␣␣\n␣␣\nb <p>a</p><p>b</p>

The second break's own two spaces make a line that holds nothing but whitespace, and Markdown reads that as a blank line, so one paragraph comes back as two. The editor writes this shape for Shift+Enter pressed twice.

Since #204 the same happens when a <br /> at the end of a bold run is followed by a <br /> (<p><strong>a<br /></strong><br />b</p>), because the edge break now moves out of the mark instead of being dropped.

Notes

  • A backslash hard break survives on a line of its own: a␣␣\n\\\nb publishes as <p>a<br />\n<br />\nb</p>. So the fix is probably to write every break after the first in a run as \ + newline.
  • Breaks are compared and trimmed as the literal " \n" in several places (renderInlineRun, renderMark's edge trim, renderCellLines' <br> substitution, the heading's <br /> substitution), so each place needs to recognise the second spelling too. Otherwise a mark's edge trim stops at the backslash.
Lenguaje dominante
Go
Estrellas
2
Forks
0
Merge medio
2 h 31 min
PR fusionados (30 d)
59

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mozilla/markfluence

Todos los issues de mozilla/markfluence

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.