Summary: | [test case] Space immediately after PRE tag is not ignored. | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | gjditchfield |
Component: | khtml parsing | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Testcase from above. |
Description
gjditchfield
2004-05-12 04:40:05 UTC
Created attachment 5965 [details]
Testcase from above.
I can confirm this bug. On closer examination the correct behavior is to preserve every white-space when it is not a line-feed that follows the tag immediately. CVS commit by carewolf: Correct parsing of white-space immediately after pre tag. BUG: 81393 M +4 -0 ChangeLog 1.406 M +6 -8 html/htmltokenizer.cpp 1.299 --- kdelibs/khtml/ChangeLog #1.405:1.406 @@ -1,2 +1,6 @@ +2005-03-21 Allan Sandfeld Jensen <kde@carewolf.com> + + * html/htmltokenizer.cpp: Only skip first LF if immediately after PRE tag + 2005-03-18 Allan Sandfeld Jensen <kde@carewolf.com> --- kdelibs/khtml/html/htmltokenizer.cpp #1.298:1.299 @@ -1136,6 +1136,6 @@ void HTMLTokenizer::parseTag(TokenizerSt switch( tagID ) { case ID_PRE: - discard = LFDiscard; prePos = 0; + discard = AllDiscard; break; case ID_SCRIPT: @@ -1365,10 +1365,8 @@ void HTMLTokenizer::write( const Tokeniz if ( pending ) { // pre context always gets its spaces/linefeeds - if ( pre ) - addPending(); // only add in existing inline context or if // we just started one, i.e. we're about to insert real text - else if ( !parser->selectMode() && - ( !parser->noSpaces() || dest > buffer )) { + if ( pre || script || (!parser->selectMode() && + ( !parser->noSpaces() || dest > buffer ))) { addPending(); discard = AllDiscard; |