Procházet zdrojové kódy

put .textBody content inside <pre> tags

Reason for this change can be read here: https://github.com/sdushantha/tmpmail/issues/14#issuecomment-694805446
Siddharth Dushantha před 5 roky
rodič
revize
c135fceb7a
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      tmpmail

+ 1 - 1
tmpmail

@@ -194,7 +194,7 @@ view_email() {
     FROM=$(jq -r ".from" <<<"$DATA")
     SUBJECT=$(jq -r ".subject" <<<"$DATA")
     HTML_BODY=$(jq -r ".htmlBody" <<<"$DATA")
-    [ -z "$HTML_BODY" ] && HTML_BODY=$(jq -r ".textBody" <<<"$DATA")
+    [ -z "$HTML_BODY" ] && HTML_BODY="<pre>$(jq -r ".textBody" <<<"$DATA")</pre>"
 
     # Create the HTML with all the information that is relevant and then
     # assigning that HTML to the variable HTML_MAIL. This is the best method