-
Notifications
You must be signed in to change notification settings - Fork 9
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(routeselector/resourceroom): remove accidental comments + fix typo #1859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I think this PR breaks functionality for a lot of old pages which were pre-cms - in the past all pages were specified in slugified form (e.g. blah-blah.md
, see this repo for examples). Would it be possible to add an exclusion for dashes?
good catch, added a special regex for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
src/routing/RouteSelector.jsx
Outdated
return !specialCharactersRegexTest.test(encodedName) | ||
const decodedName = decodeURIComponent(encodedName) | ||
return ( | ||
value === "terms-of-use.md" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this custom check for terms-of-use
now
"/sites/:siteName([a-zA-Z0-9-]+)/folders/:collectionName([a-zA-Z0-9-]+)/subfolders/:subCollectionName/editPage/:fileName", | ||
"/sites/:siteName([a-zA-Z0-9-]+)/folders/:collectionName([a-zA-Z0-9-]+)/editPage/:fileName", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, do we not need to check subCollectionName
?
Problem
merged previous PR too early, had a commit that was unpushed to upstream that removes extra comments and fixes a typo.
Solution
terms-of-use