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: replace apostrophe with empty string in header slugification #1618

Merged
merged 7 commits into from
Jun 22, 2019

Conversation

parthpp
Copy link
Contributor

@parthpp parthpp commented Jun 20, 2019

Motivation

This change is to replicate the github behaviour with respect to apostrophe in
headers. When there is an apostrophe in a header, github replaces it with empty string
when creating an anchor link to that header. Docusaurus should follow the same convention.

We are facing some problems because of this inconsistency.

Have you read the Contributing Guidelines on pull requests?

Yes

This change is to replicate the github behviour with respect to apostrophe in
headers. When there is an apostrophe in a header, github replaces it with empty string
when creating an anchor link to that header. Docusaurus should follow the same convention.
@parthpp parthpp requested a review from endiliey as a code owner June 20, 2019 18:11
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 20, 2019
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jun 20, 2019

Deploy preview for docusaurus-2 ready!

Built with commit 51b8287

https://deploy-preview-1618--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jun 20, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 51b8287

https://deploy-preview-1618--docusaurus-preview.netlify.com

@parthpp
Copy link
Contributor Author

parthpp commented Jun 20, 2019

@endiliey @yangshun Please review and merge. Thanks! 🙃

@yangshun yangshun changed the title Replace apostrophe with empty string in header to replicate GitHub behaviour fix: replace apostrophe with empty string in header slugification Jun 22, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I've added the typical apostrophe (') to that regexp as well

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

Successfully merging this pull request may close these issues.

6 participants