-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Generate explicit IDs for headings. #1641
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Deploy preview for reactjs ready! Built with commit 25df15b |
There are some weird auto-generated IDs, like Instead of our own |
Somehow, all of the https://reactjs.org/blog/2015/03/30/community-roundup-26.html#ray-wenderlich---property-finder |
Okay! I'll use github-slugger |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Oh sorry! Either way, github-slugger is safer. It can handle cases where there are two or more identical headings within a single article (e.g., The first |
bfb854b
to
3e49e97
Compare
|
||
#### Breaking Changes | ||
#### Breaking Changes {#breaking-changes-1} |
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.
so github-slugger is working fine :)
content/docs/how-to-contribute.md
Outdated
@@ -11,56 +11,56 @@ redirect_from: | |||
|
|||
React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. | |||
|
|||
### [Code of Conduct](https://code.facebook.com/codeofconduct) | |||
### [Code of Conduct](https://code.facebook.com/codeofconduct) {#code-of-conducthttpscodefacebookcomcodeofconduct} |
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.
Found an inconsistent behavior when a heading is also a link.
The correct slug is code-of-conduct
: https://reactjs.org/docs/how-to-contribute.html
Maybe we can add a String.replace
to strip links.
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.
It's code-of-conduct
: https://reactjs.org/docs/how-to-contribute.html#code-of-conduct
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 catching that though, should be fixed :)
@bvaughn could you look over this at some point? I'm hesitant to commit something so big without someone more used to this repo looking at it. |
Hey, sorry Nat. I'm traveling this weekend– from London to the East coast to visit family. Don't have a lot of bandwidth. I think merging it without waiting for a review from me was probably a good call. |
scripts/generateHeadingIDs
to add headings to a directory.content/
onyarn check-all
.Resolves: #1608