-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ var REGEXES = { | |
|
||
recipient : [ | ||
/the following addresses had permanent fatal errors (?:.*?)\s\<(.+?)\>/i, | ||
/there was a temporary problem delivering your message to (.+?). Gmail will retry/i, | ||
/there was a temporary problem (?:while )?delivering your message to (.+?). Gmail will retry/i, | ||
/the following message to \<(.+?)\> was undeliverable/i, | ||
/to the following addresses:\s*(.+)/i, | ||
/^your message wasn't delivered to (.+?)\s/mi, // "Your message wasn't delivered to [email protected]" | ||
|
@@ -555,6 +555,7 @@ class Parser { | |
_str = _str.replace(this.__regexes.line_break_double_indent_single, "\n\n"); | ||
|
||
// Replace single Line-break with regular space | ||
// TODO: re2 doesn't support lookbehinds, so for now we use a pure-JS regex | ||
_str = _str.replace(/(?<!\n)\n(?!\n)/gm, " "); | ||
|
||
// Replace long indent with double Line-break | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "email-bounce-parser", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "Parses bounce emails and extract errors", | ||
"author": "Eliott Vincent <[email protected]>", | ||
"main": "lib/index.js", | ||
|