diplodoc-platform / diplodoc-platform/transform
Support for Code Block Line Highlighting in YFM
Open
enhancement
good first issue
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 59
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 6
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.