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

docs: move codeblock title to props & use line highlight #11991

Merged
merged 5 commits into from Oct 24, 2021

Conversation

Josh-Cena
Copy link
Contributor

Summary

Many of the code blocks on the website are not directly copyable: because of the use of diff, and because of the comment directive used to indicate the file title. Docusaurus actually provides the title and highlight-line APIs to make them more accessible.

A simple regex search & replace to put all the titles in the title field.

Test plan

Before:

image

After:

image

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2021

Codecov Report

Merging #11991 (c0f88b5) into main (87a25b0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #11991   +/-   ##
=======================================
  Coverage   68.74%   68.74%           
=======================================
  Files         323      323           
  Lines       16649    16649           
  Branches     4808     4808           
=======================================
  Hits        11445    11445           
  Misses       5171     5171           
  Partials       33       33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87a25b0...c0f88b5. Read the comment docs.

Josh-Cena and others added 3 commits October 24, 2021 14:03
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

oh wow, this is great! thanks for taking the time to do this

@SimenB SimenB merged commit 7b857d5 into jestjs:main Oct 24, 2021
@Josh-Cena Josh-Cena deleted the codeblock-title branch October 24, 2021 08:04
@Josh-Cena
Copy link
Contributor Author

Welcome :D Simple regex search & replace, then ten minutes of manual review

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants