[whatwg] Pre element question

On Fri, 19 Jan 2007, Sam Ruby wrote:
> > > 
> > > [in standards mode]
> > 
> > I couldn't reproduce this. In Firefox trunk, with:
> > 
> > http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%3Cstyle%3Epre%20%7B%20border%3A%20solid%3B%20%7D%3C/style%3E%0A%3Cpre%3E%0Ax%0A%3C/pre%3E
> > 
> > ...I get the leading newline dropped.
> 
> Presumably then this is yet another difference between 
> application/xhtml+xml and text/html.

Oh yes, in XML the newline won't be going anywhere, definitely. But that's 
just XML rules.


> For reference, the current (and presumably as of now no longer valid) 
> behavior of html5lib is as follows:
> 
> #document
> |  <!DOCTYPE HTML>
> |  <html>
> |    <head>
> |      <style>
> |        "pre { border: solid; }"
> |      "
> "
> |    <body>
> |      <pre>
> |        "
> x
> "
> |      "
> "

Yeah, the leading newline in the <pre> should now be dropped.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 19 January 2007 17:06:42 UTC