Ticket #154: email2trac.diff.patch

File email2trac.diff.patch, 647 bytes (added by hju@…, 15 years ago)

patch for email2trac.py def strip_signature and def strip_quotes

  • email2trac

    old new  
    823823                """
    824824                body = []
    825825                for line in text.splitlines():
    826                         if line == '-- ':
     826                        if line.find('------')<> -1 or line.find('______')<> -1:
     827                        # .find returns a true value (-1) if substring is not found
    827828                                break
    828829                        body.append(line)
    829830
     
    837838                for line in text.splitlines():
    838839                        if line.startswith(self.EMAIL_QUOTE):
    839840                                continue
     841                        # missing: other quoting-forms
     842                        if re.search("----\s?\w+",line):
     843                                # quotes are behind message
     844                                break                   
    840845                        body.append(line)
    841846
    842847                return ('\n'.join(body))