Skip to content

Commit

Permalink
fix: module root path is only loaded on init and should not be modified
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Apr 17, 2023
1 parent 8c72957 commit 0b1b032
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/remark-plugins/links/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolve, sep } from 'node:path'

export default function relativeLinks(options) {
let extensions = ['.mdx', '.md']
let rootPath = options.rootPath
const moduleRootPath = options.rootPath
const prefix = options.prefix
if (options.extensions) {
extensions = options.extensions
Expand All @@ -25,6 +25,7 @@ export default function relativeLinks(options) {
) {
// keep a copy of the original node url for comparison
const originalUrl = node.url
let rootPath = moduleRootPath

if (options.debug) {
console.log(rootPath, node.url, options)
Expand Down

0 comments on commit 0b1b032

Please sign in to comment.