@@ -11,7 +11,7 @@ module.exports = (md, externalAttrs) => {
11
11
let hasOpenExternalLink = false
12
12
13
13
md . renderer . rules . link_open = ( tokens , idx , options , env , self ) => {
14
- const { relPath } = env
14
+ const { relativePath } = env
15
15
const token = tokens [ idx ]
16
16
const hrefIndex = token . attrIndex ( 'href' )
17
17
if ( hrefIndex >= 0 ) {
@@ -28,13 +28,13 @@ module.exports = (md, externalAttrs) => {
28
28
}
29
29
} else if ( isSourceLink ) {
30
30
hasOpenRouterLink = true
31
- tokens [ idx ] = toRouterLink ( token , link , relPath )
31
+ tokens [ idx ] = toRouterLink ( token , link , relativePath )
32
32
}
33
33
}
34
34
return self . renderToken ( tokens , idx , options )
35
35
}
36
36
37
- function toRouterLink ( token , link , relPath ) {
37
+ function toRouterLink ( token , link , relativePath ) {
38
38
link [ 0 ] = 'to'
39
39
let to = link [ 1 ]
40
40
@@ -44,8 +44,8 @@ module.exports = (md, externalAttrs) => {
44
44
45
45
// relative path usage.
46
46
if ( ! to . startsWith ( '/' ) ) {
47
- to = relPath
48
- ? url . resolve ( '/' + relPath , to )
47
+ to = relativePath
48
+ ? url . resolve ( '/' + relativePath , to )
49
49
: ensureBeginningDotSlash ( to )
50
50
}
51
51
0 commit comments