rem: html += "</table></div>";
add: html += "</pre></div>";
context:     Result format( KMail::Interface::BodyPart *bodyPart, KMail::HtmlWriter *writer ) const {      if ( !writer ) return Ok;      const QString diff = bodyPart->asText();      if ( diff.isEmpty() ) return AsIcon;      QString addedLineStyle = QString::fromLatin1(        "style=\""        "padding-left: 4px; "        "font-family: monospace; "        //"border-right: #000 dashed 1px; "        "color: green;\"");      QString fileAddStyle( "style=\"font-weight: bold; font-family: monospace; color: green; \"" );      QString removedLineStyle = QString::fromLatin1(        "style=\""        "padding-left: 4px; "        "font-family: monospace; "        "color: red;\"");      QString fileRemoveStyle( "style=\"font-weight: bold; font-family: monospace; color: red ;\"" );      QString tableStyle = QString::fromLatin1(        "style=\""        "border: dashed 1px; "        "margin: 0em;\"");      QString sepStyle( "style=\"color: black; font-weight: bold; font-family: monospace; \"" );      QString chunkStyle( "style=\"color: blue; font-family: monospace;  \"" );      QString regularStyle( "style=\"font-family: monospace;\"" );      QString html = "<br><div align=\"center\">";      html += "<table " + tableStyle +">";      QStringList lines = QStringList::split( '\n', diff, true );      for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {        QString line( QStyleSheet::escape( *it ) );        QString style;        if ( line.length() > 0 ) {          if ( line.startsWith( "+++" ) ) {            style = fileAddStyle;          } else if ( line.startsWith( "---" ) ) {            style = fileRemoveStyle;          } else if ( line.startsWith( "+" ) || line.startsWith( ">" ) ) {            style = addedLineStyle;          } else if ( line.startsWith( "-" ) || line.startsWith( "<" ) ) {            style = removedLineStyle;          } else if ( line.startsWith( "==") ) {            style = sepStyle;          } else if ( line.startsWith( "@@" ) ) {            style = chunkStyle;          } else {            style = regularStyle;          }        }        html += "<tr><td " + style + ">" + line + "</td></tr>";      }      html += "</table></div>";      writer->queue( html );      return Ok;    }