Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#213 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Go
Stelle
2
Fork
0
Merge medio
2h 31m
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/markfluence

Tutte le issue di mozilla/markfluence

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.