Conversation
|
Someone is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A link with
:target=_selfchanges the target of subsequent ordinary external links to_self, even though the configured default is_blank. The link renderer mutateslinkTargetcaptured by its closure, so one link's override becomes the next link's default.Compute target and rel locally for each rendered link. Three regression cases cover overrides on external, relative, and mailto links followed by an ordinary external link.
Example:
[First](https://example.org/first ':target=_self')followed by[Second](https://example.org/second)now keeps the second link's default_blanktarget andnoopenerrelation.Related issue, if any:
Reproduced on develop at
d823dbe51c1b2dea4c2091e2b952ded0d1e16616; no matching open fix found.What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Validation
_selfinstead of_blank.npm run test:jest -- --runInBand: 131 tests and 46 snapshots passed.npm run build,npm run lint,npm run typecheck, andgit diff --check: passed.The regression uses the existing JSDOM integration renderer. Browser E2E was not run for this patch.
Developed with assistance from OpenAI Codex; regression and fix validated locally.