-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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-infra] Add line and word highlighting on code blocks #41509
Labels
design
This is about UI or UX design, please involve a designer
new feature
New feature or request
scope: docs-infra
Specific to the docs-infra product
Comments
danilo-leal
added
new feature
New feature or request
design
This is about UI or UX design, please involve a designer
scope: docs-infra
Specific to the docs-infra product
labels
Mar 15, 2024
1 task
Hey, can I work on this feature? Seems interesting |
@JoseBarriaSantos go ahead! |
JoseBarriaSantos
added a commit
to 1CUNHA1/material-ui
that referenced
this issue
May 27, 2024
…#41509) Added the ability to highlight lines of code in a code snippet. Used the prism.js library (couldn't use rehype-pretty-code) with the line highlighting plugin, to apply the highlight. Example of use: ' ´´´javascript {1, 3-5} foo { someCode return bar } ``` ' Writing this inside a Markdown section would highlight lines 1,3,4,5 of the code snippet. Co-authored-by: LUIS BARROS <luis.barros@tecnico.ulisboa.pt>
1CUNHA1
added a commit
to 1CUNHA1/material-ui
that referenced
this issue
May 29, 2024
code blocks (mui#41509) Added the ability to highlight lines of code in a code snippet. Used the prism.js library (couldn't use rehype-pretty-code) with the line highlighting plugin, to apply the highlight. Example of use: ´´´javascript {1, 3-5} foo { someCode return bar } ``` Writing this inside a Markdown section would highlight lines 1,3,4,5 of the code snippet. Co-authored-by: JOSE SANTOS <jose.barria.santos@tecnico.ulisboa.pt>
1CUNHA1
added a commit
to 1CUNHA1/material-ui
that referenced
this issue
May 29, 2024
code blocks (mui#41509) Added the ability to highlight lines of code in a code snippet. Used the prism.js library (couldn't use rehype-pretty-code) with the line highlighting plugin, to apply the highlight. Example of use: ´´´javascript {1, 3-5} foo { someCode return bar } ``` Writing this inside a Markdown section would highlight lines 1,3,4,5 of the code snippet. Co-authored-by: JOSE SANTOS <jose.barria.santos@tecnico.ulisboa.pt>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
design
This is about UI or UX design, please involve a designer
new feature
New feature or request
scope: docs-infra
Specific to the docs-infra product
Summary
Sometimes, we may want to draw attention to a specific part of a code snippet. That can be either a small function, a variable, or an entire line. We currently lack a way of doing this "natively" within our docs-infra experience. Here's just a quick preview of what this could look like:
Benchmark
The text was updated successfully, but these errors were encountered: