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

Use markdown-toc #524

Merged
merged 2 commits into from
Apr 4, 2018
Merged

Use markdown-toc #524

merged 2 commits into from
Apr 4, 2018

Conversation

microbouji
Copy link
Contributor

@microbouji microbouji commented Mar 31, 2018

Motivation

This adds the markdown-toc library from the author of remarkable to handle TOC generation. It is much more robust than the solution I'd implemented myself. For example it handles correctly markup including links in headings so things like this don't happen: babel/website#1614 and many more edge cases I had not considered.

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

In the second commit I'm also rendering markdown backticks in the nav headings into html code tags. So this nav from the cli commands page for examlpe will change like this from left(before) to right(after):
code

Related PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 31, 2018
@microbouji microbouji changed the title Use markdown toc Use markdown-toc Mar 31, 2018
Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

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

@microbouji Hi. Sorry for the delay here. I just got back from vacation. This looks great, thanks!

I think we will also need to add a package-lock.json update as well.

@JoelMarcey JoelMarcey merged commit c437f7b into facebook:master Apr 4, 2018
@microbouji microbouji deleted the use-markdown-toc branch April 13, 2018 13:54
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.

3 participants