From 1340e37e9509e6b129ae99548b4f44fcd26b5fa5 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Mon, 26 Nov 2018 02:00:22 +0800 Subject: [PATCH] fix($core): "index" is dropped in a link with "*index" pattern (close: #996) --- lib/markdown/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/markdown/link.js b/lib/markdown/link.js index bbe9550d63..9a6c20c64c 100644 --- a/lib/markdown/link.js +++ b/lib/markdown/link.js @@ -2,7 +2,7 @@ // 1. adding target="_blank" to external links // 2. converting internal links to -const indexRE = /(.*)(index|readme).md(#?.*)$/i +const indexRE = /(^|.*\/)(index|readme).md(#?.*)$/i module.exports = (md, externalAttrs) => { let hasOpenRouterLink = false