Skip to content

Commit 0b1b032

Browse files
fix: module root path is only loaded on init and should not be modified
1 parent 8c72957 commit 0b1b032

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/remark-plugins/links/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { resolve, sep } from 'node:path'
33

44
export default function relativeLinks(options) {
55
let extensions = ['.mdx', '.md']
6-
let rootPath = options.rootPath
6+
const moduleRootPath = options.rootPath
77
const prefix = options.prefix
88
if (options.extensions) {
99
extensions = options.extensions
@@ -25,6 +25,7 @@ export default function relativeLinks(options) {
2525
) {
2626
// keep a copy of the original node url for comparison
2727
const originalUrl = node.url
28+
let rootPath = moduleRootPath
2829

2930
if (options.debug) {
3031
console.log(rootPath, node.url, options)

0 commit comments

Comments
 (0)