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

Add Line Numbering Feature for Code Blocks #534

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

Add Line Numbering Feature for Code Blocks #534

martyanovandrey opened this issue Oct 16, 2024 · 0 comments
Labels
easy good first issue Good for newcomers

Comments

@martyanovandrey
Copy link
Contributor

Enhance YFM by introducing a line numbering feature for code blocks. This feature would allow users to easily add line numbers to their code snippets, facilitating easier reference and discussion.

Proposed Solution

Introduce a new key, showLineNumbers, within the language meta string of code blocks.

Syntax Example

md input

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

result

1 const example = "This is a code block.";
2 console.log(examples);

"In the code block on line 2 ..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

1 participant