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 26357 - A sup tag with a value on next line adds a space
Summary: A sup tag with a value on next line adds a space
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 critical
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 13:32 UTC by Pallav Kumaria
Modified: 2014-07-16 14:18 UTC (History)
4 users (show)

See Also:


Attachments
Output of the case mentioned (28.54 KB, image/png)
2014-07-16 13:32 UTC, Pallav Kumaria
Details

Description Pallav Kumaria 2014-07-16 13:32:50 UTC
Created attachment 1494 [details]
Output of the case mentioned

E.g.
Following is the case where m square displays correctly in the first case and is incorrect in the second. Would assume both of them to be same and no extra space should be added.
<html>
<body>
m<sup>2</sup>
<br/>
m<sup>
2</sup>
</body>
</html>
Comment 1 Robin Berjon 2014-07-16 13:59:25 UTC
A newline behaves as a space in this context. This is expected behaviour.
Comment 2 Pallav Kumaria 2014-07-16 14:03:40 UTC
I can see it behaves like a space, but the question is why as per the xml spec a new line is not a space under any context. So this is bound to be incorrect. As far as I know a new line and a space are completely diff things and must be explicitly specified. If it is the case that this is an exception, would like to know the reson for the same and also if there are any other expections as well.
Comment 3 Robin Berjon 2014-07-16 14:18:36 UTC
(In reply to Pallav Kumaria from comment #2)
> I can see it behaves like a space, but the question is why as per the xml
> spec a new line is not a space under any context. So this is bound to be
> incorrect. As far as I know a new line and a space are completely diff
> things and must be explicitly specified. If it is the case that this is an
> exception, would like to know the reson for the same and also if there are
> any other expections as well.

In XML, a new line is a space: http://www.w3.org/TR/xml/#NT-S.

HTML is not XML. But in HTML a comparable situation applies.