parser: Don't extract diffs from replies
In '
2a915efd', a check was added to ensure mails prefixed with 'RE:' or
similar would not be parsed as patches. By time this check actually
happens, any patches had already been extracted from the mail thus these
patches were re-added to the mail content before saving the comment.
Unfortunately, this didn't take into account cases where a patch or diff
was not the last part of a mail but rather located somewhere in the
middle of the content:
Introduction content
Diff or patch content ***
Additional content
This would result in mangling of the mail as the patch would _always_ be
appended to the end:
Introduction content
Additional content
Diff or patch content ***
Handle this by only breaking a mail into a comment and a diff if there
is any possibility that we might want to use that diff.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 2a915efd ("parser: fix wrong parsing of diff comments")
Closes-bug: #95