Skip to content

Commit 90f2b73

Browse files
authored
Merge pull request #5 from ryuchihoon/fix-anchor-link-handling
Fix anchor link handling in translations
2 parents d9a6690 + 50147f4 commit 90f2b73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@ const Builder = function(outBaseDir, options) {
522522
}
523523

524524
function isArticleLink(url) {
525-
return !url.includes('/') && url.endsWith('.html');
525+
// Handle both regular html links and html links with anchors in them
526+
const baseUrl = url.split('#')[0];
527+
return !baseUrl.includes('/') && baseUrl.endsWith('.html');
526528
}
527529

528530
// Try top fix relative links. This *should* only

0 commit comments

Comments
 (0)