How can I run Google prettify to generate static HTML (w / CSS) output?

I am working on overcoming some automated emails that often contain code snippets in them. I want to use the Google prettify project for syntax to highlight code fragments.

How can I call prettifyon the server before sending emails so that users still display the highlighted syntax when javascript is disabled in their email programs (Outlook). I think I need some kind of browser emulator, as it prettifymanipulates the DOM browser.

+3
source share
1 answer

JavaScript Rhino Google v8, , , , , , DOM... , , v8. , : V8

, Hyperlight (http://code.google.com/p/hyperlight/) Pygments (http://pygments.org/)

, CSS , , , , , , , .

+2

Source: https://habr.com/ru/post/1770163/


All Articles