webdevnerdstuff / vue-code-block

Vue 3 CodeBlock - Highlight your code with ease using this syntax highlighting component powered by PrismJS or Highlight.js.
https://webdevnerdstuff.github.io/vue-code-block/
MIT License
37 stars 3 forks source link

Numbered lines #23

Closed chrfs closed 11 months ago

chrfs commented 11 months ago

Hello,

I would to ask if numbered lined are planned or if I can add a PR with the feature.

Best regards

webdevnerdstuff commented 11 months ago

This component is more of a wrapper for PrismJS and Highlight.js, so the line numbering is more of a feature of those plugins. Prism does have a line numbers plugin that does work with the Vue3 CodeBlock component (example on the site), Highlight.js does not have line numbers available.

There is no plan to add line numbers to the Vue3 CodeBlock component, and I'd be hesitant to add it due to it's integration using two external libraries.