Skip to content

fix(processor): resolve fragile md replacement and multi-hash URLs#27

Closed
moshams272 wants to merge 1 commit intowebpack:mainfrom
moshams272:fix/typedoc-url-routing
Closed

fix(processor): resolve fragile md replacement and multi-hash URLs#27
moshams272 wants to merge 1 commit intowebpack:mainfrom
moshams272:fix/typedoc-url-routing

Conversation

@moshams272
Copy link

This patch builds on top of the recent type-map refactor to safely handle TypeDoc URL edge cases. It prevents broken links when filenames contain '.md' before the extension using a boundary regex, and extracts the final anchor when TypeDoc generates multiple hash fragments to ensure correct browser navigation.

Summary

Fixes two critical URL routing edge cases from the recent type-map refactor (#25):

  1. Fragile .md replacement: Uses /\.md($|#)/ regex to avoid breaking paths containing .md (e.g., utils.md5.md).
  2. Multi-hash URLs: Extracts the final hash fragment from TypeDoc (e.g., #methods#name) to ensure correct browser anchoring.
    Follows up on issues raised in my previous PR fix(processor): resolve malformed URLs and incomplete type mapping #19.

What kind of change does this PR introduce?

Fix

Did you add tests for your changes?

No. Verified locally by running the doc generation successfully.

Does this PR introduce a breaking change?

No.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

N/A.

Use of AI

All code was reviewed and tested manually.

This patch builds on top of the recent type-map refactor to safely handle TypeDoc URL edge cases. It prevents broken links when filenames contain '.md' before the extension using a boundary regex, and extracts the final anchor when TypeDoc generates multiple hash fragments to ensure correct browser navigation.
@avivkeller
Copy link
Member

While I appreciate the intent here, we are trying to save the bulk of this work for GSoC. We got the fundamental workings down (basic pipeline), but a lot of the work here is for GSoC, which has not begun.

@avivkeller avivkeller closed this Mar 14, 2026
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.

2 participants