Skip to content

Actively maintained fork of github/email_reply_parser.

License

Notifications You must be signed in to change notification settings

shime/email_reply_parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Reply Parser

Build Status

EmailReplyParser is a small library to parse plain text email content.

This is what GitHub uses to display comments that were created from email replies. This code is being open sourced in an effort to crowdsource the quality of our email representation.

See the Ruby docs for more information.

Installation

$ gem install email_reply_parser

Usage

To parse reply body:

parsed_body = EmailReplyParser.parse_reply(email_body)

Known Issues

Quoted Headers

Quoted headers aren't picked up if the email client breaks it up into multiple lines. GMail breaks up any lines over 80 characters for you.

On <date>, <author>
wrote:
> blah

Not to mention that we're searching for "on" and "wrote". It won't work with other languages.

Possible solution: Remove "reply@reply.github.com" lines...

Weird Signatures

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***********************************

License

MIT

About

Actively maintained fork of github/email_reply_parser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.8%
  • Shell 0.2%