Skip to content

Switch to Discourse's EmailReplyTrimmer for more robust reply parsing

jneen requested to merge bugfix/outlook-language-parsing into master

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's email_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?

What are the relevant issue numbers?

Merge request reports