From 7b3610577d4b0013ea64b2585fa33c062c714b8e Mon Sep 17 00:00:00 2001 From: Paul Arterburn Date: Mon, 20 May 2024 17:32:06 -0600 Subject: [PATCH] Fix for Apple Mail --- app/lib/email_processor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/email_processor.rb b/app/lib/email_processor.rb index 7f9908e8..18524e9e 100644 --- a/app/lib/email_processor.rb +++ b/app/lib/email_processor.rb @@ -304,6 +304,7 @@ def clean_message(body) body = unfold_paragraphs(body) unless @from.include?('yahoo.com') # fix wrapped plain text, but yahoo messes this up body&.gsub!(/\[image\:\ Inline\ image\ [0-9]{1,2}\]/, "(see attached image)") # remove "Inline image" text from griddler body&.gsub!(/(?:\n\r?|\r\n?)/, "
") # convert line breaks + body&.gsub!(/(?:\n\n?|\n\n?)/, "

") # convert line breaks for iOS Mail body = "

#{body}

" # basic formatting body&.gsub!(/<(http[s]?:\/\/\S*?)>/, "(\\1)") # convert links to show up body&.gsub!(/$/, "")&.gsub!(/$/, "")&.gsub!(/^$\n/, "") # remove last unnecessary line break