minhead.py is only picking the first node from the old header and transferring
it to the new header, due to the nodelist being modified. Here's an easy fix. Props to Geoff Lankow. http://lists.planetplanet.org/archives/devel/2010-August/002157.html
This commit is contained in:
parent
bfc12a9ab4
commit
5d9df85826
@ -28,7 +28,7 @@ if first < minhead:
|
||||
for i in range(6,0,-1):
|
||||
for oldhead in doc.getElementsByTagName('h%d' % i):
|
||||
newhead = doc.createElementNS(XHTML_NAMESPACE, 'h%d' % (i+minhead-first))
|
||||
for child in oldhead.childNodes:
|
||||
for child in oldhead.childNodes[:]:
|
||||
newhead.appendChild(child)
|
||||
oldhead.parentNode.replaceChild(newhead, oldhead)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user