# Tweaking patterns in email\_reply\_trimmer

**URL:** https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767
**Category:** Development
**Tags:** fixed
**Created:** [September 26, 2017, 12:19am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767 "2017-09-26T00:19:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 26, 2017, 12:19am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/1 "2017-09-26T00:19:05Z")

</div>

Hey, @gerhard. I’m still doing an import with a bunch of mailing lists sucked in to nabble.

There are a bunch of posts that are announcements and have a line of dashes near the top, so the whole post gets truncated by trim since the line is a delimiter:

> <https://github.com/discourse/email_reply_trimmer/blob/main/lib/email_reply_trimmer.rb#L42-L47>

I think I’m just going to edit out those lines for this import and move on with my life.

But is there a better way?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 26, 2017, 8:19am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/2 "2017-09-26T08:19:37Z")

</div>

> [@pfaffman](#):
>
> But is there a better way?

Remove that line before passing the email to the importer?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 26, 2017, 12:15pm UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/3 "2017-09-26T12:15:49Z")

</div>

Well that’s hilariously obvious. 😊

---

<div class="post-metadata">

### Author: ![PortChange](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/portchange/32/316112_2.png) [@PortChange](https://meta.discourse.org/u/PortChange)
#### Post date: [August 6, 2026, 8:51am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/4 "2026-08-06T08:51:31Z")

</div>

This has now been fixed, see [FIX: preserve inline replies and image lines when trimming emails - Pull Request #25 - discourse/email\_reply\_trimmer - GitHub](https://github.com/discourse/email_reply_trimmer/pull/25)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 6, 2026, 10:10am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/5 "2026-08-06T10:10:09Z")

</div>

9 years later … wow 🙂

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [August 13, 2026, 10:10am UTC](https://meta.discourse.org/t/tweaking-patterns-in-email-reply-trimmer/70767/6 "2026-08-13T10:10:46Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
