The page parser in `tests/docs/pages.py` misreads Markdown no page uses yet

Aperta
#119 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
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, markdown, python
Ambito
testing, tooling

Direzione di ricerca

Start with tests/docs/pages.py and its existing tests; the issue lists the parser constructs that are misread and asks for a test per construct. Reproduce a case from the list, run the relevant page parser tests, then run make qa. Done when each listed construct is covered and fixed here, and the updated file matches the copies in the named repositories.

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

Descrizione

tech debt
Description of Technical Debt

tests/docs/pages.py is hand-written, and copied into living-doc-generator-markdown, living-doc-collector-gh and
living-doc-utilities (and ported into living-doc). Two reviews found constructs it misreads:

  • _CODE_SPAN's backtick run can backtrack, so a double backtick pairs with a later single one, and a code span may
    cross a list or table boundary.
  • A <!-- in the middle of a prose line opens a comment, and the comment state and the comment regex can disagree.
  • A tab counts as one column, not up to four.
  • A closing fence left of its list item's content closes the block instead of ending the item, and the list state is
    not updated on a fence's own lines.
  • Nested-list fences and a list inside a blockquote are not handled.
  • A prose line that starts [label]: reads as a reference definition, and footnote labels are not handled.
  • git ls-files runs without -z, so a non-ASCII path comes back quoted.
  • _LINE_NUMBER_RE knows only two dotfiles.
Impact of Technical Debt
  • A page check may pass or fail wrongly the day a page uses one of these.
Category

Testing / Test Coverage

Priority

Low - Nice to have

Proposed Solution

Fix here first, with a test per construct, then update each copy. Pick it up when a page uses one of these constructs or a check misreads a page.

Effort Estimate

2 days

Dependencies / Related

No response

Additional Context

Measured 2026-11-12 at living-doc-toolkit fea9aa6 (v0.1.0). Re-check:

Per repository: diff <its tests/docs/pages.py> <this repository's>, then plant the construct on a page and run make qa.

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
1g 7h
PR unite (30g)
19

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 AbsaOSS/living-doc-toolkit

Tutte le issue di AbsaOSS/living-doc-toolkit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.