peacock

JavaScript syntax highlighter that generates pygments compatible html and therefore supports pygments styles.

peacock

JavaScript syntax highlighter that generates html that is compatible with pygments styles.

  • functional server side
npm install peacock
  • returns the highlighted version of the file whose fullPath ({String}) was passed or throws an error if it was not able to parse it
  • theme ({Object} or {String}) is used to optionally override the theme used to highlight
    • if it is {Object} it has to be of this form
    • it can also be a {String} (either the name of a built-in theme or the full path to a theme anywhere on your computer

Examples (browse)