Skip to content

Conversation

@jonludlam
Copy link
Member

Page links were not being remapped because the remap prefix check only matched against the directory path. For modules, the module name is part of the directory (e.g., prefix/otherpkg/Otherlib/index.html), so it matched. But for pages, the page name is in the filename (e.g., prefix/otherpkg/otherpage.html), leaving only prefix/otherpkg in the directory - which didn't match prefix/otherpkg/ due to the trailing slash.

Fix by including the filename in the path used for prefix matching. Also normalize remap entries at config creation time (ensure trailing slashes) rather than on each lookup.

🤖 Generated with Claude Code

Page links were not being remapped because the remap prefix check
only matched against the directory path. For modules, the module name
is part of the directory (e.g., prefix/otherpkg/Otherlib/index.html),
so it matched. But for pages, the page name is in the filename
(e.g., prefix/otherpkg/otherpage.html), leaving only prefix/otherpkg
in the directory - which didn't match prefix/otherpkg/ due to the
trailing slash.

Fix by including the filename in the path used for prefix matching.
Also normalize remap entries at config creation time (ensure trailing
slashes) rather than on each lookup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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