This commit is contained in:
Kovid Goyal 2012-01-05 19:32:03 +05:30
parent 5b147cd745
commit db6059ca00

View File

@ -474,10 +474,10 @@ class CanonicalFragmentIdentifier
x = (point.a*rect.left + (1-point.a)*rect.right)
y = (rect.top + rect.bottom)/2
[x, y] = viewport_to_document(x, y, ndoc)
tn = if span.firstChild then span.firstChild.nodeValue else ''
tn = ndoc.createTextNode(tn)
p = span.parentNode
p.insertBefore(tn, span)
for node in span.childNodes
span.removeChild(node)
p.insertBefore(node, span)
p.removeChild(span)
p.normalize()
if callback