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

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
git, markdown, python
Domain
testing, tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
0
Forks
0
Avg merge
1d 7h
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AbsaOSS/living-doc-toolkit

All issues in AbsaOSS/living-doc-toolkit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.