Node.js Port of GitHub's email_reply_parser.rb
npm install emailreplyparserNode.js port of Github's EmailReplyParser, a small library to parse plain text email content.
Quoted headers aren't picked up if there's an extra line break:
On
> blah
Also, they're not picked up if the email client breaks it up into
multiple lines. GMail breaks up any lines over 80 characters for you.
On
wrote:
> blah
Not to mention that we're search for "on" and "wrote". It won't work
with other languages.
Possible solution: Remove "reply@reply.github.com" lines...
Lines starting with - or _ sometimes mark the beginning of
signatures:
Hello
--
Rick
Not everyone follows this convention:
Hello
Mr Rick Olson
Galactic President Superstar Mc Awesomeville
GitHub
DISCLAIMER*
Note: blah blah blah
DISCLAIMER*
Apparently, prefixing lines with > isn't universal either:
Hello
--
Rick
________________________________________
From: Bob [reply@reply.github.com]
Sent: Monday, March 14, 2011 6:16 PM
To: Rick
npm install nodeunitnodeunit test/email_reply_parser_test.js