New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support relativePath link set linkTarget #1750
Labels
Comments
bilibiliou
changed the title
Support RelativePath link compile
Support relativePath link jump
Feb 12, 2022
bilibiliou
changed the title
Support relativePath link jump
Support relativePath link set linkTarget
Feb 12, 2022
"src\core\render\compiler\link.js" line 22 if (
!isAbsolutePath(href) && // If it is relative path, then cant set linkTarget
!compilerClass._matchNotCompileLink(href) &&
!config.ignore
) {
if (href === compilerClass.config.homepage) {
href = 'README';
}
href = router.toURL(href, null, router.getCurrentPath());
} else {
if (!isAbsolutePath(href) && href.slice(0, 2) === './') {
href =
document.URL.replace(/\/(?!.*\/).*/, '/').replace('#/./', '') + href;
}
attrs.push(href.indexOf('mailto:') === 0 ? '' : `target="${linkTarget}"`);
attrs.push(
href.indexOf('mailto:') === 0
? ''
: linkRel !== ''
? ` rel="${linkRel}"`
: ''
);
} |
Thx for ur report. |
Okay, thx ur reply and support |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
When I read the docs of "Set target attribute for link" https://docsify.js.org/#/helpers?id=set-target-attribute-for-link
I try a relative path to jump
but It be compiled as
It is not my expectation.
After then, I read the source code: "src\core\render\compiler\link.js" line 22
I discover that
docsifyjs
didnt support relative path linkTarget customso I make the issue in order to discuss the problem
thx
The text was updated successfully, but these errors were encountered: