We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
codesandbox link
file tree like below
. ├── 测试 │ └── README.md
I add a nav (/测试) , and I can route to the page successfully.
However, If I set permalink (e.g. /test) to the README.md, vue-router failed to match the page.
/test
vue-router can match the page
when setting permalink, the router config generated like below. vue-router failed to match correct page because of the encoded path.
{ path: "/%E6%B5%8B%E8%AF%95/index.html", redirect: "/test/" },
the correct router config should like this
{ path: "/测试/index.html", redirect: "/test/" },
vuepress/packages/@vuepress/core/lib/node/internal-plugins/routes.js
Lines 68 to 75 in c56d889
regularPath
I am trying to generate sidebar/nav automatically, so folder name in Chinese is a useful info to me.
npx vuepress info
Environment Info: System: OS: macOS 10.15 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Binaries: Node: 11.12.0 - ~/.nvm/versions/node/v11.12.0/bin/node Yarn: 1.19.0 - /usr/local/bin/yarn npm: 6.7.0 - ~/.nvm/versions/node/v11.12.0/bin/npm Browsers: Chrome: 77.0.3865.90 Firefox: Not Found Safari: 13.0.2 npmPackages: @vuepress/core: 1.2.0 @vuepress/theme-default: 1.2.0 vuepress: ^1.0.3 => 1.2.0 npmGlobalPackages: vuepress: Not Found
The text was updated successfully, but these errors were encountered:
fix($core): decode regularPath when generate router config
ffdc807
vue-router can't match path contains encoded string like Chinese, when using permalink. fix vuejs#1946
fix($core): decode regularPath when generate router config (fix #1946) (
dd26c7c
#1947)
Successfully merging a pull request may close this issue.
Bug report
Steps to reproduce
codesandbox link
file tree like below
. ├── 测试 │ └── README.md
I add a nav (/测试) , and I can route to the page successfully.
However, If I set permalink (e.g.
/test
) to the README.md, vue-router failed to match the page.What is expected?
vue-router can match the page
What is actually happening?
when setting permalink, the router config generated like below. vue-router failed to match correct page because of the encoded path.
the correct router config should like this
vuepress/packages/@vuepress/core/lib/node/internal-plugins/routes.js
Lines 68 to 75 in c56d889
the problem caused by these codes,
regularPath
is encodedOther relevant information
I am trying to generate sidebar/nav automatically, so folder name in Chinese is a useful info to me.
npx vuepress info
in my VuePress project:The text was updated successfully, but these errors were encountered: