How can I use it in Node.js
jasonxia23 opened this issue · 3 comments
jasonxia23 commented
How can I use it in Node.js
wcoder commented
Hi, thanks for the question!
Current implementation doesn't allow use that with Node.JS
jasonxia23 commented
IMO, to support using in Node.js, lineNumbersBlock
should be extracted, which may be a breaking change to your preexisting API.
ahouck commented
I found the code already pulled out (and nicely in typescript) here in another comment by @pwnoy.
It looks like Highlightjs supports node out of the box along with plugins,
https://highlightjs.readthedocs.io/en/latest/plugin-api.html. Could we reconfigure this package to be added via a highlightjs plugin for both node and the browser? Or would it be better to create a fork?