Permalink
Browse files

Support removal of templates as well

  • Loading branch information...
HazardSJ committed May 28, 2013
1 parent 7c12d35 commit 51c1668ff752810e67d1bc3fe44b6b6367e3c099
Showing with 4 additions and 0 deletions.
  1. +4 −0 citationstyle.py
@@ -41,6 +41,10 @@ def replaceWikilinks(template, URL, title):
self.code.replace(link, link.text)
else:
self.code.replace(link, link.title)
temps = template.get(title).value.filter_templates()
if temps:
for temp in temps:
self.code.remove(temp)
## @fixme: Use a function, and use {{Cite doi}} as well, just in case...
## ...or generate from [[Category:Citation Style 1 templates]]? (doesn't include {{citation}} though)
#template = pywikibot.Page(self.site, "Template:Cite web")

0 comments on commit 51c1668

Please sign in to comment.