alexwforsythe / code-blocks

Syntax highlighting for Google Docs
https://www.alexwforsythe.com/code-blocks/
MIT License
698 stars 88 forks source link

Code Blocks v2 -- Change from Highlight.js to Prism? #142

Open djD-REK opened 4 years ago

djD-REK commented 4 years ago

Hey @alexwforsythe , Thanks for this useful Google Docs feature!

I've seen multiple requests for React / JSX / TSX in the Issues board, and it looks like Highlight.js has no plans to support it.

Would you be interested in having me work on switching Code Blocks from Highlight.js to PrismJS?

It looks like you're already using Juice to extract the CSS stylesheet into inline styles (like Emogrifier).

So it seems like it would be pretty simple for me to switch the hljs (Highlight.js) library for the PrismJS library, as using Prism just means including the prism.css and prism.js files you downloaded in your page.

The big advantages would be:

Please let me know, and I'm happy to submit a pull request!