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
@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.
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