pygments-promise
Fully Promise wrapper for Pygments
Usage
There are two functions exported by the package - pygmentize and pygmentizeFile.
pygmentize
Highlight a block of code
Example:
var pygmentize = pygmentize markup; ;
Allowed options are:
lexer
: Specify lexer for pygmentizeformatter
: Specify pygmentize lexeroptions
: A object of options passed to pygmentize via-P key=value
Options need not be specified. If no lexer is provided pygmentize will attempt
to guess based on contents. The default formatter is html
.
pygmentizeFile
Load a file and pygmentize it
var pygmentizeFile = pygmentizeFile markup; ;
License
MIT