This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11578 - whitespace in pre
Summary: whitespace in pre
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 01:13 UTC by David Carlisle
Modified: 2011-08-04 05:07 UTC (History)
4 users (show)

See Also:


Attachments

Description David Carlisle 2010-12-20 01:13:45 UTC
6.5.1  says that pre (and textarea) should not begin with whitespace.

this seems both under-defined (whitespace is defined to be different sets of names in xml and html5 and it isn't clear which is meant here) and over restrictive, html5 only specifies that a single leading newline is removed.

http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-pre-element

So I believe for example

<pre>    xxx   </pre>

should be allowed in a polyglot document, even though it begins with spaces.

David
Comment 1 Eliot Graff 2011-01-05 21:59:59 UTC
Hi David.

In the editor's draft, dated 5 January, section 6.5.1 now says the following:

6.5.1 Newlines in <textarea> and <pre> Elements
When polyglot markup uses either a <textarea> or <pre> element, the text within the element does not begin with a newline. 

I believe this satisfies what this bug requested. If there's additional information about whitespace that needs to be inserted, please let me know.

Thanks,

Eliot
Comment 2 Michael[tm] Smith 2011-08-04 05:06:48 UTC
mass-move component to LC1
Comment 3 Michael[tm] Smith 2011-08-04 05:07:12 UTC
mass-move component to LC1