Skip to content
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

[Bug report] Customized URL Protocol is not Recongzied #1404

Closed
Masterain98 opened this issue Aug 29, 2023 · 2 comments · Fixed by #1421
Closed

[Bug report] Customized URL Protocol is not Recongzied #1404

Masterain98 opened this issue Aug 29, 2023 · 2 comments · Fixed by #1421
Labels
bug Something isn't working

Comments

@Masterain98
Copy link

Description

Refer to vuepress-theme-hope/vuepress-theme-hope#3395

In the markdown file, the link field with customized URL protocol will be converted based on the relative path rule instead of considering it as an absolute link.

In the reproduction below, I use the link ms-windows-store://pdp/?ProductId=9PH4NXJ2JN52 in the primary button. When click on it, it redirects to a link that does not exist, instead of pulling up the Windows Store.

Reproduction

https://stackblitz.com/edit/vuepress-5qhpva?file=docs%2FREADME.md

Used Package Manager

npm

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.20.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
  Utilities:
    Git: Not Found
  Browsers:
    Chrome: Not Found
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.66 
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli:  2.0.0-beta.66 
    @vuepress/client:  2.0.0-beta.66 
    @vuepress/core:  2.0.0-beta.66 
    @vuepress/markdown:  2.0.0-beta.66 
    @vuepress/plugin-active-header-links:  2.0.0-beta.66 
    @vuepress/plugin-back-to-top:  2.0.0-beta.66 
    @vuepress/plugin-container:  2.0.0-beta.66 
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.66 
    @vuepress/plugin-git:  2.0.0-beta.66 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.66 
    @vuepress/plugin-nprogress:  2.0.0-beta.66 
    @vuepress/plugin-palette:  2.0.0-beta.66 
    @vuepress/plugin-prismjs:  2.0.0-beta.66 
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.66 
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.66 
    @vuepress/theme-default:  2.0.0-beta.66 
    @vuepress/utils:  2.0.0-beta.66 
    vue:  3.3.4 
    vue-loader: Not Found
    vue-router:  4.2.4 
    vuepress: next => 2.0.0-beta.66 
    vuepress-vite:  2.0.0-beta.66 
    vuepress-webpack: Not Found
@Mister-Hope
Copy link
Member

@meteorlxy We only handle mail and tel link by isLinkMailto and isLinkTel, I think we do need some support here.

I would suggest removing 2 functions above and add hasProtocal

@meteorlxy
Copy link
Member

Good point. PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants