Skip to content

Commit e8b78c4

Browse files
committed
fix($markdown): "index" is dropped in a link with "*index" pattern
Reported at #996
1 parent b0133e3 commit e8b78c4

File tree

1 file changed

+1
-1
lines changed
  • packages/@vuepress/markdown/lib

1 file changed

+1
-1
lines changed

packages/@vuepress/markdown/lib/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)