fix(mail): replace new line by space to avoid glued words

This commit is contained in:
Colin Darie 2023-07-06 10:58:44 +02:00
parent edc790be8f
commit 219f71f64b

View file

@ -38,7 +38,7 @@ module MailTemplateConcern
def default_for_procedure(procedure)
template_name = default_template_name_for_procedure(procedure)
rich_body = ActionController::Base.render template: template_name
trix_rich_body = rich_body.gsub(/(?<!^|[.-])(?<!<\/strong>)\n/, '')
trix_rich_body = rich_body.gsub(/(?<!^|[.-])(?<!<\/strong>)\n/, ' ')
new(subject: const_get(:DEFAULT_SUBJECT), body: trix_rich_body, rich_body: trix_rich_body, procedure: procedure)
end