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-infra] Add line and word highlighting on code blocks #41509

Open
danilo-leal opened this issue Mar 15, 2024 · 2 comments
Open

[docs-infra] Add line and word highlighting on code blocks #41509

danilo-leal opened this issue Mar 15, 2024 · 2 comments
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
Copy link
Contributor

danilo-leal commented Mar 15, 2024

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:

Screenshot 2024-03-15 at 19 28 49

Benchmark

  • @atomiks shared his rehype-pretty-code library that we could potentially use! In terms of DX, I don't think we should deviate too much from how it is done in it.
  • Docusaurus also has its own way of adding this feature that we can be inspired by too.
@danilo-leal 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
@JoseBarriaSantos
Copy link

Hey, can I work on this feature? Seems interesting

@danilo-leal
Copy link
Contributor Author

@JoseBarriaSantos go ahead!

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
Projects
Status: Backlog
Development

No branches or pull requests

2 participants