Reputation: 468
I want to display Github patches, and I don't want to write my own parser. Specifically we are parsing the files.patch like in this example from the Github API docs.
I was hoping for something like Google-Code-Prettify, but extensive Googling hasn't turned anything up. Is there anything to do this?
Upvotes: 5
Views: 3732
Reputation: 2962
parse-diff (CoffeeScript as well, but shouldn't matter as it can be used in any JS context) sounds a better (more widely used, maintained) option.
Upvotes: 3
Reputation: 5703
Would node-diff-parser help? Admittedly, it appears to be in CoffeeScript rather than straight JavaScript.
Alternatively, you could try jonjonsonjr's diff-parse which looks to be in straight JavaScript.
Upvotes: 1