Skip to content

Commit 06d5cd7

Browse files
committed
v1.0.22
Fix Gmail wording
1 parent 8fa7490 commit 06d5cd7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/parser.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ var REGEXES = {
113113

114114
recipient : [
115115
/the following addresses had permanent fatal errors (?:.*?)\s\<(.+?)\>/i,
116-
/there was a temporary problem delivering your message to (.+?). Gmail will retry/i,
116+
/there was a temporary problem (?:while )?delivering your message to (.+?). Gmail will retry/i,
117117
/the following message to \<(.+?)\> was undeliverable/i,
118118
/to the following addresses:\s*(.+)/i,
119119
/^your message wasn't delivered to (.+?)\s/mi, // "Your message wasn't delivered to [email protected]"
@@ -555,6 +555,7 @@ class Parser {
555555
_str = _str.replace(this.__regexes.line_break_double_indent_single, "\n\n");
556556

557557
// Replace single Line-break with regular space
558+
// TODO: re2 doesn't support lookbehinds, so for now we use a pure-JS regex
558559
_str = _str.replace(/(?<!\n)\n(?!\n)/gm, " ");
559560

560561
// Replace long indent with double Line-break

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "email-bounce-parser",
3-
"version": "1.0.21",
3+
"version": "1.0.22",
44
"description": "Parses bounce emails and extract errors",
55
"author": "Eliott Vincent <[email protected]>",
66
"main": "lib/index.js",

0 commit comments

Comments
 (0)