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 number option to code highlight though config #458

Open
Tracked by #588
Star3Lord opened this issue Jun 10, 2022 · 3 comments
Open
Tracked by #588

Add line number option to code highlight though config #458

Star3Lord opened this issue Jun 10, 2022 · 3 comments
Labels
assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req
Milestone

Comments

@Star3Lord
Copy link

Star3Lord commented Jun 10, 2022

It would be useful to have option to add line numbers to code highlight. This could be configured with

defineMDSveXConfig({
    highlight: {
        lineNumbers: true,
    }
})
@easyfrog
Copy link

I also want to show the line-numbers in the code blocks, but I can not find a solution to how to use prismjs plugins like line-numbers.

So It's there a solution for now?

@artemkovalyov
Copy link

Same here, can't find a way to show line numbers for Prism. @pngwn, do you have a proven workaround or solution in mind?

@artemkovalyov
Copy link

I guess we are not getting it because of this: #284
I assume the only way would be to run some preprocessor from rehype to add a class after MDSvex did its job.

@pngwn pngwn added this to the 1.0 milestone Feb 23, 2024
@pngwn pngwn mentioned this issue Feb 23, 2024
13 tasks
@pngwn pngwn added the assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req
Projects
None yet
Development

No branches or pull requests

4 participants