Ticket #414 (new defect )

Opened 5 years ago

Last modified 4 months ago

Missing space between </q> and <code> even though there exists a space in the .xhtml file

Reported by: Nafai Assigned to: exarkun
Type: defect Priority: normal
Milestone: Component: web
Keywords: Cc: glyph, Nafai, spiv, itamarst, moshez, exarkun
Branch: Author:
Launchpad Bug:

Attachments

Change History

  2003-11-25 11:00:12+00:00 changed by Nafai

For example, look at the Components howto and look for this:
<q>smart</q> <code>HairDryer</code>
And then look at the corresponding output

  2003-11-28 16:27:10+00:00 changed by moshez

This is a problem in MicroDOMParser: it ignores gotText if it's all space
and the element is not shouldPreserveSpace. Perhaps it would be better
in that case to pretend we got exactly one space:
 def gotText(....)
     if ...:
         ....
     else:
+        self.gotStandAlone(Text, ' ')

  2003-12-19 08:38:36+00:00 changed by itamarst

empty space is dropped in order to up performance.

  2004-03-08 03:16:09+00:00 changed by jknight

Performance without correctness is not good. This is a bug. XML documents are usually space-
insensitive, but that only means you can translate multiple spaces into one space, not eat them entirely.

  2006-12-05 04:03:59+00:00 changed by exarkun

  • cc changed from glyph, Nafai, spiv, itamarst, moshez to glyph, Nafai, spiv, itamarst, moshez, exarkun
  • keywords set to review
  • owner deleted
  • priority changed from high to highest

I agree with James.

The branch whitespace-preservation-414 removes a test for the invalid behavior, adds a couple tests for the valid behavior, and changes the parser to collapse multiple spaces into one space, rather than eating them entirely.

  2006-12-05 04:58:59+00:00 changed by exarkun

  • keywords deleted
  • owner set to exarkun

There are some failing tests in lore still which I guess I'll need to fix.

  2008-07-24 19:39:24+00:00 changed by exarkun

  • priority changed from highest to normal
  • branch deleted
  • author deleted

This is pretty hard. It's not actually a high priority for me now. I hope this ticket can be resolved someday, but it'll probably be a while before I get back to it again.

Note: See TracTickets for help on using tickets.