Skip to content

Commit 14fee0c

Browse files
authored
fix: escape dot in rehype-link-transformer regex (#1679)
1 parent 98eb591 commit 14fee0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

remark/rehype-link-transformer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const rehypeLinkTransformer = () => (tree, vfile) => {
99
if (node.tagName === "a") {
1010
const href = url.parse(node.properties.href);
1111
if (href.hostname === null && href.pathname?.endsWith(".md") && existsSync(vfile.history[0])) {
12-
href.pathname = basename(href.pathname).replace(/.md$/, ".html");
12+
href.pathname = basename(href.pathname).replace(/\.md$/, ".html");
1313
node.properties.href = url.format(href);
1414
}
1515
}

0 commit comments

Comments
 (0)