Render Markdown links and images in one bounded pass #196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "md-links-one-pass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Reworks the inline step of the dashboard's Markdown renderer (
_md_inlineinweb.py, used for/guideand the What's new release notes):[label](url)) and images (, shown as a "Picture: alt" link, never loaded) are matched by a single_MD_LINKpattern in a single pass, and each generated link is stashed behind a placeholder, the way code spans already were. No later pass (links, bold, italic) ever sees markup the renderer generated.Checklist
Lint passes — the real-data check is clean locally; the Lint workflow runs the rest.
Tests pass — new tests in
test_web.py:href/id/data-labelattributes and allow-listed hrefs;In the full suite, 1,744 pass; the 5
test_web.pypotfile-import tests fail locally exactly as onmain(local werkzeug).Nothing real: no secrets, no personal information, no real data.
Consent gates intact.
Docs updated in the same PR — no operator-visible change beyond #195's.
Commit messages are short and imperative.
Release impact
kestrel_pipackage only.Notes for review
Follows #195; no release carries the code this replaces.
🤖 Generated with Claude Code