discarding the line feed after <pre>

Stephan Kulow coolo at kde.org
Thu Jan 15 16:51:01 GMT 2004


Hi!

I got annoyed by the (minor) bug that konqueror adds extra whitespace
at the beginning of code examples. That happens as khtml in opposition
to all browsers I tried, take the line feed after <pre> in account when
rendering.

Just one example (and about the only "regression" that shows up in 
our tests): http://bugs.kde.org/attachment.cgi?id=549=

This is the patch, please comment (for 3.2.1 :)

Greetings, Stephan

--- html/htmltokenizer.cpp      14 Jan 2004 20:43:05 -0000      1.285
+++ html/htmltokenizer.cpp      15 Jan 2004 16:47:36 -0000
@@ -1094,6 +1094,7 @@ void HTMLTokenizer::parseTag(DOMStringIt

             switch( tagID ) {
             case ID_PRE:
+               discard = LFDiscard;
                 prePos = 0;
                 break;
             case ID_SCRIPT:

-- 
There may be no I in TEAM, but a M and an E.




More information about the kfm-devel mailing list