docpad-plugin-highlightjs icon indicating copy to clipboard operation
docpad-plugin-highlightjs copied to clipboard

Support transforms after the highlight

Open sergiolopes opened this issue 12 years ago • 4 comments

I like the transforms hook this plugin exposes, but I need something after the code generation. My use case is that I want to add line numbers to the generated code–a feature that Highlight.js doesn't have.

sergiolopes avatar Apr 16 '13 05:04 sergiolopes

From memory you can add line numbers using css, perhaps that would work even better?

balupton avatar Apr 16 '13 12:04 balupton

I don't think this is possible, because Highlight.js doesn't split lines in separate elements for us to match in CSS. I tried CSS counters too :)

sergiolopes avatar Apr 16 '13 17:04 sergiolopes

Hello, is now possible to add line numbers? Thanks for answer. edit (after 1 hour): I started implementing it in javascript in client side (-;

lukasMega avatar Sep 14 '13 18:09 lukasMega

I also need a post-transform hook for some advanced post-formatting. Is it possible to implement something like postTransforms config? It looks really easy to do, I even have a draft working.

mikhailshilkov avatar Jul 22 '15 17:07 mikhailshilkov