I want to display Github patches, and I don't want to write my own parser. In particular, we are parsing .patch files, as in this example from Github API documents .
I was hoping for something like Google-Code-Prettify , but extensive Googling didn't change anything. Is there anything for this?
parse-diff (CoffeeScript also, but does not matter, since it can be used in any JS context) sounds better (more widely used, supported).
Was node-diff-parser help? Admittedly, this is similar to CoffeeScript, not direct JavaScript.
Alternatively, you can try jonjonsonjr diff-parse , which looks like direct JavaScript.