This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maltehelmert
Recipients akuchling, maltehelmert, r.david.murray
Date 2009-03-17.16:05:44
SpamBayes Score 1.4621929e-07
Marked as misclassified No
Message-id <1237305951.76.0.0282172351633.issue2170@psf.upfronthosting.co.za>
In-reply-to
Content
I eyeballed the new patch and wonder if the case where text nodes are
collapsed is handled correctly. Assume that self.childNodes contains
nodes [A, B, C], where A and B are non-empty text nodes and C is a
non-text node.

The algorithm would collapse A and B into A and then unlink B, and I
think C.previousSibling would still reference the unlinked B, rather
than the correct A. Am I missing something?

If this is indeed a bug in the proposed patch, I suggest adding an
additional test for this case.

The bug itself should not be too hard to fix; the "elif" case would need
the same

    if child.nextSibling:
        child.nextSibling.previousSibling = child.previousSibling

assignment as the "if" case.
History
Date User Action Args
2009-03-17 16:05:52maltehelmertsetrecipients: + maltehelmert, akuchling, r.david.murray
2009-03-17 16:05:51maltehelmertsetmessageid: <1237305951.76.0.0282172351633.issue2170@psf.upfronthosting.co.za>
2009-03-17 16:05:45maltehelmertlinkissue2170 messages
2009-03-17 16:05:45maltehelmertcreate