Commit 50147f4
committed
Fix anchor link handling in translations
Fixes an issue where anchor links (e.g., webgpu-fundamentals.html#section)
in translation pages were incorrectly redirecting to the English version
instead of staying within the same language directory.
The problem was in the isArticleLink() function which didn't properly
recognize HTML files with anchors as article links. Now it splits the URL
on '#' and checks the base URL.
Before: webgpu-fundamentals.html#anchor -> ../webgpu-fundamentals.html#anchor (English)
After: webgpu-fundamentals.html#anchor -> webgpu-fundamentals.html#anchor (Same language)
🤖 Generated with [Claude Code](https://claude.ai/code)1 parent d9a6690 commit 50147f4
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
| |||
0 commit comments