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
refactor: simplify blog url replacement regex #1491
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 49ea62e |
Deploy preview for docusaurus-preview ready! Built with commit 49ea62e |
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.
Thanks for your PR, but a test plan of "Nah" is disrespectful to the project and the PR reviewers and can result in your future PRs being closed immediately.
@yangshun |
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.
Please read the CONTRIBUTING guidelines. It states that the PR titles have to follow a format. We would really appreciate if you read through the PR template more. I've changed it for you here.
I think this looks ok. cc @endiliey
@yangshun Thank you, This change for |
Motivation
/\/index.html$/
is wrong, it should be/\/index\.html$/
/\/index\.html$/
and/\.html$/
to/(\/index)?\.html$/
new RegExp('/', 'g')
but I think change it to same other RegExp.replace('-', '/')
was called thrice, maybe he want to replace all so I change it to /-/g (I'm wrong here)Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan