Bug 279745 regression fix to force <PRE> blocks to honour leading blank lines r=bienvenu
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 11 Mar 2009 23:37:12 +0000
changeset 2189 dc17a79d4b83b37430704de1ccf29a6811ab469b
parent 2188 1fb30e6ec643cabbf38e8fe9853fe0391337057d
child 2190 7cee254d0f807416eda7c3fdeb933e39cf5a6122
push idunknown
push userunknown
push dateunknown
reviewersbienvenu
bugs279745
Bug 279745 regression fix to force <PRE> blocks to honour leading blank lines r=bienvenu
mailnews/mime/src/mimetpla.cpp
--- a/mailnews/mime/src/mimetpla.cpp
+++ b/mailnews/mime/src/mimetpla.cpp
@@ -219,20 +219,20 @@ MimeInlineTextPlain_parse_begin (MimeObj
             }
             if (!fontLang.IsEmpty())
             {
               openingDiv += " lang=\"";
               openingDiv += fontLang;
               openingDiv += '\"';
             }
           }
-          openingDiv += "><pre wrap>";
+          openingDiv += "><pre wrap>\n";
         }
         else
-          openingDiv = "<pre wrap>";
+          openingDiv = "<pre wrap>\n";
       status = MimeObject_write(obj, openingDiv.get(), openingDiv.Length(), PR_FALSE);
       if (status < 0) return status;
 
       /* text/plain objects always have separators before and after them.
        Note that this is not the case for text/enriched objects. */
       status = MimeObject_write_separator(obj);
       if (status < 0) return status;
     }
@@ -394,24 +394,24 @@ MimeInlineTextPlain_parse_line (const ch
         {
           prefaceResultStr += "<blockquote type=cite style=\"";
           prefaceResultStr += style;
           prefaceResultStr += "\">";
         }
         else
           prefaceResultStr += "<blockquote type=cite>";
       }
-      prefaceResultStr += "<pre wrap>";
+      prefaceResultStr += "<pre wrap>\n";
     }
     else if (text->mCiteLevel < oldCiteLevel)
     {
       prefaceResultStr += "</pre>";
       for (PRUint32 i = 0; i < oldCiteLevel - text->mCiteLevel; i++)
         prefaceResultStr += "</blockquote>";
-      prefaceResultStr += "<pre wrap>";
+      prefaceResultStr += "<pre wrap>\n";
     }
 
     // Write plain text quoting tags
     if (logicalLineStart != 0 && !(plainHTML && text->mBlockquoting))
     {
       if (!plainHTML)
         prefaceResultStr += "<span class=\"moz-txt-citetags\">";