You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up fixing two bugs found in a retrospective review of #271 (which preserved target nodes but not their anchors):
tab-set: docutils PropagateTargets moves a preceding target's ids onto the tab-item container, which TabSetHtmlTransform destroys (it only copied the rubric's ids) — so href="#my-target" pointed at nothing in HTML. The container's ids are now carried onto the rendered label.
tab-set-code: targets were dropped entirely (asymmetric with tab-set), same broken-anchor result with no diagnostics. They are now preserved identically.
The #271 test passed against the broken output because it asserted target-node survival and refid resolution, but never that any rendered node still carries the id — it now asserts both that and the literal id="…" in the built HTML (verified to fail against unfixed code), plus a new tab-set-code variant.
Also includes the review's docs nit: get_started.md now says the extra MyST extensions need to be added to the myst_enable_extensions snippet shown, rather than implying the snippet already enables them.
Note: the py311-no-myst env fails on this branch's base due to #271's unguarded myst-parametrized tests — that fix is in #274; after it merges this branch rebases cleanly (mid-file edits only).
Validation: tox -e py311, mypy, ruff check/format, docs-furo all green; the strengthened tests confirmed red against unfixed tabs.py.
Follow-up to #271, which preserved target nodes but not their anchors:
- docutils PropagateTargets moves a preceding target's ids onto the
tab-item container, which TabSetHtmlTransform destroys — copy the
container's ids onto the rendered label so href targets exist
- tab-set-code dropped targets entirely (asymmetric with tab-set) —
preserve them the same way
- strengthen the target test to assert a rendered node carries the id
and that it appears in the built HTML (the previous assertions
passed against the broken output); add a tab-set-code variant
- get_started: clarify that examples may need extending
myst_enable_extensions beyond the snippet shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fixing two bugs found in a retrospective review of #271 (which preserved target nodes but not their anchors):
PropagateTargetsmoves a preceding target's ids onto the tab-item container, whichTabSetHtmlTransformdestroys (it only copied the rubric's ids) — sohref="#my-target"pointed at nothing in HTML. The container's ids are now carried onto the rendered label.The #271 test passed against the broken output because it asserted target-node survival and
refidresolution, but never that any rendered node still carries the id — it now asserts both that and the literalid="…"in the built HTML (verified to fail against unfixed code), plus a new tab-set-code variant.Also includes the review's docs nit:
get_started.mdnow says the extra MyST extensions need to be added to themyst_enable_extensionssnippet shown, rather than implying the snippet already enables them.Note: the
py311-no-mystenv fails on this branch's base due to #271's unguarded myst-parametrized tests — that fix is in #274; after it merges this branch rebases cleanly (mid-file edits only).Validation:
tox -e py311,mypy,ruff check/format,docs-furoall green; the strengthened tests confirmed red against unfixedtabs.py.