master
Sandra 5 years ago
parent 426889e00d
commit 399e49a58e

@ -50,10 +50,10 @@ def rewritelinks (html):
if "external" in linkclass: if "external" in linkclass:
# leave external links alone # leave external links alone
continue continue
print ("LINK", href) # print ("LINK", href)
if href.startswith("/sandbox/itchwiki/index.php/"): if href.startswith("/sandbox/itchwiki/index.php/"):
new_href = new_href = filenameforlink(href)
# a.attrib['href'] = new_href a.attrib['href'] = new_href
html = ET.tostring(t, method="html", encoding="unicode") html = ET.tostring(t, method="html", encoding="unicode")
return html return html

Loading…
Cancel
Save