Skip to content

Commit b489495

Browse files
committed
Fix: When relativePath: false, use root absolute paths are for images, solve method as use same router with markdown file then remove beginning "#" (docsifyjs#877docsifyjs#850)
1 parent b8b221f commit b489495

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/render/compiler/image.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const imageCompiler = ({ renderer, contentBase, router }) =>
3535
}
3636

3737
if (!isAbsolutePath(href)) {
38-
url = getPath(contentBase, getParentPath(router.getCurrentPath()), href);
38+
url = getPath(contentBase, router.toURL(href, null, router.getCurrentPath()));
3939
}
4040

4141
if (attrs.length > 0) {

0 commit comments

Comments
 (0)