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

Support for Code Block Line Highlighting in YFM #535

Open
martyanovandrey opened this issue Oct 16, 2024 · 0 comments
Open

Support for Code Block Line Highlighting in YFM #535

martyanovandrey opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@martyanovandrey
Copy link
Contributor

It would be beneficial if YFM supported line highlighting within code blocks. This feature is frequently used in documentation to draw attention to critical lines of code, demonstrate changes, or emphasize specific parts of the code.

Proposed Solution

Introduce a new prop, {1,3-5}, within the language meta string of code blocks.

Syntax Example

```javascript {1}
const example = "This is a code block.";
console.log(examples);

Reference: https://docusaurus.io/docs/markdown-features/code-blocks#line-numbering

@martyanovandrey martyanovandrey moved this to Todo in Help wanted Nov 13, 2024
@martyanovandrey martyanovandrey added the enhancement New feature or request label Dec 14, 2024
@martyanovandrey martyanovandrey moved this from Todo to In progress in Help wanted Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

1 participant