CommonMark spec gaps grouped by root cause, and a question about lookup tables
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, markdown
- Ambito
- compilers, testing-qa
Direzione di ricerca
Inizia da update-specs.js e riesegui la suite di specifiche CommonMark sui casi shouldFail elencati per confermare lo snapshot. Prima di modificare il codice, ottieni una decisione da un maintainer sull’accettabilità delle tabelle di lookup all’interno del footprint senza dipendenze. Il lavoro è completo quando esiste un’implementazione accettata che risolve i casi scelti oppure una decisione documentata di mantenerli come lacune note.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I ran the spec suite on main (18.0.9, 681373c) and went through the cases carrying shouldFail to see what is actually left. Since update-specs.js sets that flag from whatever fails at the time it runs, the set is a snapshot of current behavior rather than a list of decisions, so I grouped it by root cause. Posting it in case it is useful for triage, and because two of the groups run into the same wall and that seems worth asking about before anyone starts on them.
CommonMark 0.31.2, gfm: false, 15 cases:
| Root cause | Examples | Count |
|---|---|---|
| Character references in link destination and title | 32, 33, 503 | 3 |
| Nested brackets in link text | 512, 518, 519, 520, 528, 532, 533 | 7 |
| Raw HTML and autolinks taking precedence over links | 524, 526, 536, 538 | 4 |
| Unicode case folding of link labels | 540 | 1 |
Running the same file with gfm: true flags 4 more (602, 608, 611, 612), but those look like the autolink extension doing its job against a spec file written before it existed. For instance 611 expects https://example.com to stay plain text and marked links it, which is what GFM asks for. I would not count those as gaps.
gfm.0.29 has 4: 633, 634 and 635 are mailto: and xmpp: autolinks, 657 is the disallowed raw HTML filter.
The wall
The two smallest groups look approachable until you try them, and both need a lookup table, which sits badly with marked having no runtime dependencies.
Character references, current output on the left:
[foo](/föö "föö")
<p><a href="/föö" title="föö">foo</a></p>
<p><a href="/f%C3%B6%C3%B6" title="föö">foo</a></p>
[link](foo%20bä)
<p><a href="foo%20bä">link</a></p>
<p><a href="foo%20b%C3%A4">link</a></p>
Leaving the entity in place works for text content because the browser resolves it, but a destination has to be decoded first and then percent encoded, and getting there means the HTML5 named reference table.
Case folding is the same shape. Example 540 wants [ẞ] to match [SS], which needs full folding to ss. I tried the usual shortcuts and neither gets there:
'ẞ'.toLowerCase() // 'ß'
'SS'.toLowerCase() // 'ss'
'ẞ'.toUpperCase().toLowerCase() // 'ß'
The question
Would you take a PR that adds a table for either of these, and if so is there a size budget worth knowing about? Or would you rather they stay as known gaps and keep the dependency-free footprint as it is?
Happy to do the work on whichever you would accept. If the answer is neither, that is a useful answer too, and it might be worth a note somewhere so the next person does not rediscover it.
- Lingua principale
- TypeScript
- Stelle
- 37.3k
- Fork
- 3.9k
- Merge medio
- 5g 6h
- PR unite (30g)
- 62
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di markedjs/marked
-
Inline raw HTML is escaped after an unclosed `_` / `*` / `~` (regression in 18.2.1)Forse già presa @O1sumitkumar l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni
-
Lazy continuation line inside a quoted list item is parsed as a nested listForse già presa @amstedy l’ha presa 1 giorno fa. ApertaL2 - annoying
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
markedjs/marked#4293 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Deeply nested emphasis is quadratic and overflows the stack in the lexerForse già presa @Pastalikek65 l’ha presa 5 giorni fa. Apertacategory: inline elements L2 - annoying
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
markedjs/marked#4286 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
markedjs/marked#4282 · 8 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Quadratic time in the inline `text` rule: its email look-ahead rereads the rest of the paragraphForse già presa @yxshee l’ha presa 10 giorni fa. ApertaL2 - annoying
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di markedjs/marked
Issue simili
-
Media browser returns "Not found" for repositories using the SHA-256 object formatForse già presa @adamchodera l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Follow-ups from #312Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
janhesters/remixcn#318 ·
I maintainer di solito rispondono entro 1 giorno
-
Interceptor LaunchTestProfile.sh: no Windows (Git Bash/MSYS) branch, test profile never launchesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
danielmiessler/LifeOS#3150 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Make the "%" unit spacing the same in the web and in A10Forse già presa @kragent66-glitch l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 commento ·