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

Fix section pages if section name has inappropriate symbols #1384

Conversation

mendrew
Copy link
Contributor

@mendrew mendrew commented Jun 15, 2019

If you have a forward slash in your section name, the pagePerSection links are all broken,
resulting in "Page not found".

For example:
pagePerSection links break when section name includes a "/", like name: '@foo/components'

The solution is just to encode a name in the getUrl and then correctly
decode it in the router hash logic.

iss: #1332

Fix for pagePerSection links break when section name includes a  :

mendrew added 2 commits June 15, 2019 02:31
If you have a forward slash in your section name, the pagePerSection links are all broken,
 resulting in "Page not found".
Removing the forward slashes in the names fixes the issue.

For example:
  pagePerSection links break when section name includes a "/", like `name: '@foo/components'`

Solution is just encode name in the getUrl and then correctly
decode it in the router logic.

iss: styleguidist#1332
@codecov-io
Copy link

Codecov Report

Merging #1384 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
src/client/utils/handleHash.js 96.15% <100%> (ø) ⬆️
src/client/utils/getUrl.js 96.15% <100%> (+0.15%) ⬆️

@sapegin sapegin merged commit a9e1985 into styleguidist:master Jun 15, 2019
@sapegin
Copy link
Member

sapegin commented Jun 15, 2019

Thanks!

@styleguidist-bot
Copy link
Collaborator

🎉 This PR is included in version 9.1.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants