Skip to content

Add href mutation#2

Merged
ahjephson merged 1 commit intodevelopfrom
feature/mutate-hrefs
Mar 14, 2026
Merged

Add href mutation#2
ahjephson merged 1 commit intodevelopfrom
feature/mutate-hrefs

Conversation

@ahjephson
Copy link
Contributor

Mutates anchor hrefs attributes to ensure browser links always work.

@ahjephson ahjephson marked this pull request as draft March 14, 2026 09:28
@ahjephson ahjephson changed the base branch from master to develop March 14, 2026 09:28
@ahjephson ahjephson marked this pull request as ready for review March 14, 2026 09:28
@ahjephson ahjephson merged commit 7be8470 into develop Mar 14, 2026
3 checks passed
@ahjephson ahjephson deleted the feature/mutate-hrefs branch March 14, 2026 09:30
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 413ba9210b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +237 to +238
if (!hashRoutingState.options.interceptInternalLinks || anchor.hasAttribute("download")) {
return;

Choose a reason for hiding this comment

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

P2 Badge Preserve non-self anchor targets during href rewrite

rewriteAnchorHref canonicalizes every internal a[href] to a hash URL but does not mirror the existing target guard in the click interceptor (target && target !== "_self"). As a result, links intentionally marked with targets like _blank are rewritten anyway, so browser-managed navigation opens the hash-routed SPA URL instead of the original path URL; this changes the behavior of links that were previously used to opt out of interception.

Useful? React with 👍 / 👎.

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