Skip to content

🐛 Resolve card reStructuredText link targets - #324

Open
draarivpatel-ui wants to merge 2 commits into
executablebooks:mainfrom
draarivpatel-ui:fix-164-card-rst-link-targets
Open

draarivpatel-ui wants to merge 2 commits into
executablebooks:mainfrom
draarivpatel-ui:fix-164-card-rst-link-targets

Conversation

@draarivpatel-ui

Copy link
Copy Markdown

Fixes #164.

Card :link: values ending in an underscore were always treated as URLs, so a reStructuredText hyperlink target such as hyperlink-target_ rendered as a relative link instead of resolving its target.

This change treats a bare trailing-underscore link as a reStructuredText reference and, once the document is resolved, links directly to an external target URI in the same way as an inline reStructuredText reference. Internal targets continue to resolve internally.

Tests:

  • python -m pytest -q tests/test_card_link.py - 19 passed
  • ruff check sphinx_design tests/test_card_link.py
  • ruff format --check sphinx_design tests/test_card_link.py

Copilot AI balanced review requested due to automatic review settings November 25, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docutils hyperlink targets don't work for clickable cards

2 participants