mailgun / talon

Apache License 2.0
1.26k stars 287 forks source link

Unable to remove the part containing '--- Forwarded message ---' #220

Open chenxg283 opened 3 years ago

chenxg283 commented 3 years ago

hi, if my email content is like below:

"""reply

----- Forwarded message ----

some forwarded text"""

the markers will be "tefet".

However, in the function "process_marked_lines" in quotations.py, there is this code: if re.match('[te]*f', markers): return_flags[:] = [False, -1, -1] return lines

This will return the whole email content as the reply without removing the "---- Forwarded message ----" and subsequent text.

Is this intended?

atymic commented 2 years ago

Yea, noticed the same issue.

chenxg283 commented 2 years ago

I have created a PR to fix this issue. If anyone has a better solution, please share as well. thanks.