Skip to content

Support internal hyperlinks - #23

Open
imphil wants to merge 1 commit into
atsphinx:mainfrom
imphil:internal-hyperlinks
Open

Support internal hyperlinks#23
imphil wants to merge 1 commit into
atsphinx:mainfrom
imphil:internal-hyperlinks

Conversation

@imphil

@imphil imphil commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Add support for internal hyperlinks. Add tests to ensure that works,
as well as all other link types by docutils. The tests follow the
reference at https://www.docutils.org/docs/ref/rst/restructuredtext.html#hyperlink-targets.

Summary by CodeRabbit

  • New Features
    • Added support for converting internal reStructuredText hyperlink targets into navigable Typst labels.
    • Expanded hyperlink documentation to cover external, internal, indirect, implicit, and anonymous targets.
    • Added examples of internal, indirect, and anonymous hyperlinks in both reStructuredText and Typst formats.

Add support for internal hyperlinks. Add tests to ensure that works,
as well as all other link types by docutils. The tests follow the
reference at https://www.docutils.org/docs/ref/rst/restructuredtext.html#hyperlink-targets.
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0028e5aa-0d78-4aba-b25c-8d69b0b76250

📥 Commits

Reviewing files that changed from the base of the PR and between 333a721 and cd6822a.

📒 Files selected for processing (8)
  • docs/spec/hyperlinks/anonymous.rst.txt
  • docs/spec/hyperlinks/anonymous.typ.txt
  • docs/spec/hyperlinks/index.rst
  • docs/spec/hyperlinks/indirect.rst.txt
  • docs/spec/hyperlinks/indirect.typ.txt
  • docs/spec/hyperlinks/internal.rst.txt
  • docs/spec/hyperlinks/internal.typ.txt
  • src/rst2typst/writer.py

📝 Walkthrough

Walkthrough

Expanded hyperlink documentation with descriptions and RST/Typst examples for external, internal, indirect, and anonymous targets. Implemented TypstTranslator.visit_target to ignore external targets and emit Typst labels for internal target identifiers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 16 — The implementation emits Typst labels for internal targets instead of dropping them, directly addressing the issue objective.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding support for internal hyperlinks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 rst2typst | 🛠️ Build #33652643 | 📁 Comparing cd6822a against latest (333a721)

  🔍 Preview build  

1 file changed
± spec/hyperlinks/index.html

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.

1 participant