Static html generation with prismjs - how to enable line-numbers?
问题 I'm using node.js to generate static html files from code, formatting them with prismjs. Within my app, I do not have access to an HTML renderer that supports Javascript (I'm using 'htmllite'). So I need to be able to generate HTML that does not require Javascript. const Prism = require('prismjs'); const loadLanguages = require('prismjs/components/'); loadLanguages(['csharp']); const code = '<a bunch of C# code>'; const html = Prism.highlight(code, Prism.languages.csharp, 'csharp'); This