mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-20 19:58:17 +00:00
Fix email formatting.
Markdown was swallowing the carriage returns. We use the nl2br extension now.
This commit is contained in:
parent
a39e0ba219
commit
5df8f127c7
@ -64,11 +64,11 @@ class EmailService(object):
|
||||
|
||||
def get_rendered_content(self, message, data):
|
||||
template = Template(message)
|
||||
rendered = template.render(data)
|
||||
rendered_markdown = markdown.markdown(rendered)
|
||||
wrapped = self.get_cr_connect_wrapper(rendered_markdown)
|
||||
content = template.render(data)
|
||||
rendered_markdown = markdown.markdown(content, extensions=['nl2br'])
|
||||
content_html = self.get_cr_connect_wrapper(rendered_markdown)
|
||||
|
||||
return rendered, wrapped
|
||||
return content, content_html
|
||||
|
||||
@staticmethod
|
||||
def get_cr_connect_wrapper(email_body):
|
||||
|
Loading…
x
Reference in New Issue
Block a user