Remove restriction of balanced parens in definition destination

Aperta
#661 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
markdown
Ambito
documentation

Direzione di ricerca

Start by comparing the Link reference definitions, Link destination, and Links sections of the CommonMark specification with the issue's examples. Review how the proposed alternatives affect parsing and the expected HTML. Done means the specification has an agreed rule for parentheses in definitions and matching examples reflect that rule.

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

Descrizione

For links, balanced parens are useful: [a](b(c)), although it imposes a potential performance problem due to having to track that balance (Implementations may impose limits on parentheses nesting to avoid performance issues, but at least three levels of nesting should be supported. (link))

For definitions, having to track balance adds nothing useful for vendors or authors. Rather, it imposes potential performance problems for vendors or unexpected results for authors.

[x]: a(b
[y]: a)b

[x] [y].

Yields:

<p>[x]: a(b
[y]: a)b</p>
<p>[x] [y].</p>

Expected:

<p><a href="a(b">x</a> <a href="a)b">y</a>.</p>

For a solution in the spec, I suggest either explicitly lifting the restriction for Link reference definitions, or lifting it in the Link destination and enforcing it in Links

Lingua principale
Python
Stelle
5.2k
Fork
361
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 commonmark/commonmark-spec

Tutte le issue di commonmark/commonmark-spec

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.