Skip to content

Python server and JavaScript client talking via stdin/stdout to highlight code using the pygments highlighter.

Notifications You must be signed in to change notification settings

thlorenz/pygmentsjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pygmentsjs

Python server and JavaScript client talking via stdin/stdout to highlight code using the great pygments highlighter.

Why

Currently the only available JavaScript wrappers for pygments fire up a new process each time some code is to be highlighted.

This is very inefficient, puts lots of unnecessary pressure on the CPU and as a result shows bad performance.

pygmentsjs aims to improve on this by creating one python process that serves highlighted code on stdout whenever a JavaScript client pushes a request via stdin.

Why not just use a JavaScript highlighter?

I tried lots of different JavaScript highlighters, but keep coming back to pygments because nothing else seems to get close in generating highly readable highlighted code.

About

Python server and JavaScript client talking via stdin/stdout to highlight code using the pygments highlighter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published