# Rendering of e-mail template adds unnecessary whitespace

**URL:** <https://meta.discourse.org/t/rendering-of-e-mail-template-adds-unnecessary-whitespace/62399>\
**Category:** Feature\
**Created:** [May 10, 2017, 2:21am UTC](https://meta.discourse.org/t/rendering-of-e-mail-template-adds-unnecessary-whitespace/62399 "2017-05-10T02:21:40Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [May 10, 2017, 3:38pm UTC](https://meta.discourse.org/t/rendering-of-e-mail-template-adds-unnecessary-whitespace/62399/6 "2017-05-10T15:38:22Z")

</div>

Yeah I see [the problem](https://github.com/discourse/discourse/blob/master/lib/email/styles.rb#L186-L193).

```plaintext
result.gsub!(/\[email-indent\]/, "<div style='margin-left: 15px'>")
result.gsub!(/\[\/email-indent\]/, "</div>")

```

That will create some mangled html.

---

_[View the full topic](https://meta.discourse.org/t/rendering-of-e-mail-template-adds-unnecessary-whitespace/62399)._
