Skip to content

Commit 7179cf2

Browse files
committed
Update logic to ignore additional relative link patterns
1 parent 5118a0b commit 7179cf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plugins/remove-markdown-extensions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const removeMarkdownExtensions: Plugin = function ({
2020
return (tree: Node) => {
2121
visit(tree, "link", (node: Element) => {
2222
// ignore relative links if configured
23-
if (ignoreRelativeLinks && node.url.startsWith("./")) {
23+
if (
24+
ignoreRelativeLinks &&
25+
(node.url.startsWith("./") || node.url.startsWith("../"))
26+
) {
2427
return;
2528
}
2629

0 commit comments

Comments
 (0)