tests: check alternate Markdown link titles (TEST-MARKDOWN-LINK-TITLES) #839

Merged
TheGeogeo merged 1 commit from upstream-pr/839 into main 2026-11-25 21:24:46 +00:00
TheGeogeo commented 2026-11-24 14:25:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T14:25:40Z.


Claimed in the coordination issue as: TEST-MARKDOWN-LINK-TITLES

What and why

The link checker misses broken inline destinations when the title is single-quoted, parenthesized or contains an escaped delimiter. Match the three CommonMark title forms without changing the destination capture. The synthetic regression checks broken files, a missing anchor and an existing anchor. This carries forward my earlier ProjectLeonida/Leonida PR #10084 onto this repository's current matcher.

Tested

After a rebase on main 6293c1c4 (32fc5eec, same patch as 3eee59b8), on Windows 11, Python 3.12.4: tests/test_docs_links.py 17 OK; test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK; git diff --check and the no-game-data check clean.

  • Windows, Python 3.12.4. The regression failed against the d0da7dad matcher because it reported none of three broken destinations.
  • python -I -B tests/test_docs_links.py: 17 passed.
  • python -B -m unittest discover -s tests -p 'test_docs_*.py': 48 passed.
  • git diff --check and python -I -B scripts/check_no_game_data.py tests/test_docs_links.py: passed.

GPUs tested: n/a. CPU-only tests.

AI-assisted: Yes, Codex.

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
  • Translator contract entry: not applicable.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5474027079 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/839). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T14:25:40Z. --- Claimed in the coordination issue as: [TEST-MARKDOWN-LINK-TITLES](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134289336) ### What and why The link checker misses broken inline destinations when the title is single-quoted, parenthesized or contains an escaped delimiter. Match the three [CommonMark title forms](https://spec.commonmark.org/0.31.2/#links) without changing the destination capture. The synthetic regression checks broken files, a missing anchor and an existing anchor. This carries forward my earlier `ProjectLeonida/Leonida` PR #10084 onto this repository's current matcher. ### Tested After a rebase on `main` `6293c1c4` (`32fc5eec`, same patch as `3eee59b8`), on Windows 11, Python 3.12.4: `tests/test_docs_links.py` 17 OK; `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK; `git diff --check` and the no-game-data check clean. - Windows, Python 3.12.4. The regression failed against the `d0da7dad` matcher because it reported none of three broken destinations. - `python -I -B tests/test_docs_links.py`: 17 passed. - `python -B -m unittest discover -s tests -p 'test_docs_*.py'`: 48 passed. - `git diff --check` and `python -I -B scripts/check_no_game_data.py tests/test_docs_links.py`: passed. GPUs tested: n/a. CPU-only tests. AI-assisted: Yes, Codex. ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption. - Translator contract entry: not applicable.
abnalstlll-byte commented 2026-11-24 14:40:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:40:44Z.

Review: APPROVED


Audited and verified. Extends markdown link regex in ests/test_docs_links.py to support all CommonMark title delimiter variants (double quotes, single quotes, and parentheses with escape handling), preventing spurious link target truncation in docs linting. Unit tests pass cleanly. Approved.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6041301045 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/839#pullrequestreview-6041301045). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T14:40:44Z. **Review:** APPROVED --- Audited and verified. Extends markdown link regex in ests/test_docs_links.py to support all CommonMark title delimiter variants (double quotes, single quotes, and parentheses with escape handling), preventing spurious link target truncation in docs linting. Unit tests pass cleanly. Approved.
TheGeogeo commented 2026-11-24 21:22:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T21:22:18Z.


Rebased on main 6293c1c4: 3eee59b8 -> 32fc5eec, same patch (git range-diff). The previous base failed tests/test_tool_stdout_encoding.py, which #948 fixed on main, and the earlier CI run never started (action_required).

  • Windows 11, Python 3.12.4, after the rebase: tests/test_docs_links.py 17 OK; test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK; git diff --check and the no-game-data check clean.
  • The approval here was made before the rebase, on 3eee59b8.

No code change in this rebase. CI on the new head is still queued.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144841149 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/839#issuecomment-7144841149). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T21:22:18Z. --- Rebased on `main` `6293c1c4`: `3eee59b8` -> `32fc5eec`, same patch (`git range-diff`). The previous base failed `tests/test_tool_stdout_encoding.py`, which #948 fixed on `main`, and the earlier CI run never started (action_required). - Windows 11, Python 3.12.4, after the rebase: `tests/test_docs_links.py` 17 OK; `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK; `git diff --check` and the no-game-data check clean. - The approval here was made before the rebase, on `3eee59b8`. No code change in this rebase. CI on the new head is still queued. AI-assisted: yes (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!839
No description provided.