Switch to Discourse's EmailReplyTrimmer for more robust reply parsing
What does this MR do?
- Replaces our copy-pasta'd
discourse_email_trimmer
method with an actual gem from the Discourse team,email_reply_trimmer
, which is a re-architecting of Github'semail_reply_parser
. - Adds support for 5 more languages (not just Dutch and English) in Outlook's reply headers. The next gem release will also have support for Italian, which at least one of our clients uses.
Are there points in the code the reviewer needs to double check?
- Discourse's gem allows empty-quotes (comments with no non-quoted content) as a special case, and I'm detecting those manually
- The gem also doesn't strip linewise whitespace, which is a slight issue for our tests, but is semantically equivalent in Markdown.
- This branch depends on !7397 (merged), but if needed could be made independent.
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together