Skip to content

🐛 FIX: Keep project: references inside the project - #1239

Open
Cherith1222 wants to merge 1 commit into
executablebooks:masterfrom
Cherith1222:fix-project-scheme-stays-internal
Open

Cherith1222 wants to merge 1 commit into
executablebooks:masterfrom
Cherith1222:fix-project-scheme-stays-internal

Conversation

@Cherith1222

Copy link
Copy Markdown
Contributor

Fixes #1235.

project: is an internal reference, and inv: is the intersphinx scheme. The project: prefix was removed and the target was then resolved like a plain # link, so a name missing from this project could match an external inventory.

A plain # link still falls through to an inventory.

Tests, on Windows with Python 3.13.3:

  • With the intersphinx fallback left in place, test_project_scheme_does_not_use_intersphinx failed. <project:#paragraph-target> and [explicit](project:#paragraph-target) both linked to https://example.com/index.html#paragraph-target, and the build raised no myst.xref_missing warning.
  • On this commit the same test passed (1 passed).
  • tests/test_renderers/test_fixtures_sphinx.py::test_link_resolution, tests/test_renderers/test_fixtures_docutils.py::test_link_resolution, and tests/test_sphinx/test_sphinx_builds.py::test_references also passed (18 passed together with the new test).
  • ruff 0.17.4 check and ruff format --check passed on the five Python files in this change.

Not run: the full suite, tox, mypy, and pre-commit.

This patch was drafted with AI assistance (Grok 4.7 in Cursor).

A missing project: target was resolved through an intersphinx inventory.

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.

project: links fall back to external intersphinx references when local targets are missing

1 participant