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

read: a bold or italic span starting or ending with punctuation reads back as literal asterisks

Aperta
#216 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, markdown
Ambito
cli, content

Direzione di ricerca

Start with the table property test mentioned in the issue and trace the read/write and publish conversion paths for marked spans. Reproduce the punctuation cases against the current goldmark-based behavior, then compare the relevant handling with CommonMark's flanking rules. Done means spans such as (b) next to letters no longer round-trip or publish with literal asterisks.

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

Descrizione

A bold, italic or strikethrough span whose text starts or ends with punctuation, with a letter or digit just outside it, reads back as literal asterisks. Reproduced on main:

storage read writes publish sends
<p>a<strong>(b)</strong>c</p> a**(b)**c <p>a**(b)**c</p>
<p><strong>&amp;copy;</strong>a</p> **\&copy;**a (since #203) literal asterisks

CommonMark's flanking rule has two halves. The whitespace half (a delimiter next to whitespace on the wrong side does not open or close) was fixed for marks in #204. The punctuation half remains: a closing ** preceded by punctuation closes only if it is followed by whitespace or punctuation, and an opening ** followed by punctuation opens only if it is preceded by whitespace or punctuation. So **(b)**c does not close, and the whole span publishes as text with its asterisks.

Escaping cannot fix it, since the punctuation is the span's own text. Possible fixes:

  • Write such a span as inline HTML (<strong>(b)</strong>), which goldmark passes through and the forward converter already accepts.
  • Use the _ delimiter where it helps. It has stricter intraword rules, so it is probably not a general answer.

Found while working on #203; the table property test's generator now keeps a mark's text from starting or ending with punctuation to avoid it.

Lingua principale
Go
Stelle
4
Fork
1
Merge medio
2h 31m
PR unite (30g)
49

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.