Version: 4.0 (using KDE 3.0.4) Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112) OS: Linux (i686) release 2.4.18-3 I have found a bug in the export of sourcecode with syntaxhighlighting to HTML (menu File/Export/Html) in KWrite: When the last word of your sourcecode is defined as bold or italic (f.ex. a keyword etc.), then the export forgets to close the <b> or <i> tag with an </b>, </i>, so the html code is not valid. Only the <span>-Tag will be closed, not <b> or <i>.
Subject: kdelibs/kate/part CVS commit by rodda: Close final <b> and <i> tags on HTML Export. Backport. CCMAIL:49630-done@bugs.kde.org M +8 -1 katedocument.cpp 1.419 --- kdelibs/kate/part/katedocument.cpp #1.418:1.419 @@ -4722,4 +4722,11 @@ bool KateDocument::exportDocumentToHTML( (*outputStream) << endl; } + + // Be good citizens and close our tags + if (previousCharacterWasBold) + (*outputStream) << "</b>"; + if (previousCharacterWasItalic) + (*outputStream) << "</i>"; + // HTML document end : (*outputStream) << "</span>"; // i'm guaranteed a span is started (i started one at the beginning of the output).