image url begin with "/" should be AbsolutePath,not RelativePath
Bug Report
Steps to reproduce
add a md file in a sub1 dir /docs/sub1/test.md
add a img.png in /docs/images
add a imgLink in sub1/test.md:

Current behaviour
docsify render the image url to :
/./sub1/images/img.png
Expected behaviour
docsify should render the image url to :
/images/img.png
- Docsify version:
- [x ] Bug still occurs when all/other plugins are disabled?
Please create a reproducible sandbox
the regular expression in isAbsolutePath function only considers the cases ofhttp://or https://, but does not take into account URLs that start with /, so the bug happen
var isAbsolutePath = cached(function (path) {
return /(:|(\/{2}))/g.test(path);
});
Hi @poerlang , thx for your report! We already raised this issue in #1891, we still discuss on how to refactor its behavior and keep the things work more as expectation.
Bug acknowledged. Tracking with #1891.