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

Merged
leonida/mandy
TheGeogeo merged 1 commit from test/markdown-link-title-delimiters into main 2026-11-25 21:24:46 +00:00

Pull request successfully merged and closed

TheGeogeo commented 2026-11-24 14:25:40 +00:00

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.
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 approved these changes 2026-11-24 14:40:44 +00:00
abnalstlll-byte left a comment

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.

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

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).

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 description provided.