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

[Feature] Code block supports displaying line numbers #1288

Open
2 tasks done
Ligayu opened this issue Apr 1, 2024 · 0 comments
Open
2 tasks done

[Feature] Code block supports displaying line numbers #1288

Ligayu opened this issue Apr 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ligayu
Copy link

Ligayu commented Apr 1, 2024

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Problem

I want every line of the code block to be wrapped in a class.
like:
image
Then I can simply add css and display the line number.
like:
code {
counter-reset: step;
counter-increment: step 0;
}

  code .line::before {
    content: counter(step);
    counter-increment: step;
    width: 1rem;
    margin-right: 1.5rem;
    display: inline-block;
    text-align: right;
    color: rgba(115,138,148,.4)
  }

Solution

none

Alternatives

none

@Ligayu Ligayu added the enhancement New feature or request label Apr 1, 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
None yet
Development

No branches or pull requests

2 participants