Skip to content

Commit 1340e37

Browse files
committed
fix($core): "index" is dropped in a link with "*index" pattern (close: #996)
1 parent c6484e7 commit 1340e37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/markdown/link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// 1. adding target="_blank" to external links
33
// 2. converting internal links to <router-link>
44

5-
const indexRE = /(.*)(index|readme).md(#?.*)$/i
5+
const indexRE = /(^|.*\/)(index|readme).md(#?.*)$/i
66

77
module.exports = (md, externalAttrs) => {
88
let hasOpenRouterLink = false

0 commit comments

Comments
 (0)