diff --git a/command-line/update.py b/command-line/update.py index 724d973..f7c3737 100644 --- a/command-line/update.py +++ b/command-line/update.py @@ -86,6 +86,8 @@ def clean_up(html): """ html = re.sub(r'\[.*edit.*\]', '', html) # remove the [edit] html = re.sub(r'href="/book/index.php\?title=', 'href="#', html) # remove the internal wiki links + html = re.sub(r'[(?=\d)', '', html) # remove left footnote bracket [ + html = re.sub(r'(?<=\d)]', '', html) # remove right footnote bracket ] return html def parse_page(pagename, wiki): diff --git a/web-interface/update.py b/web-interface/update.py index d28c7f2..7ada867 100644 --- a/web-interface/update.py +++ b/web-interface/update.py @@ -87,6 +87,8 @@ def clean_up(html): """ html = re.sub(r'\[.*edit.*\]', '', html) # remove the [edit] html = re.sub(r'href="/book/index.php\?title=', 'href="#', html) # remove the internal wiki links + html = re.sub(r'[(?=\d)', '', html) # remove left footnote bracket [ + html = re.sub(r'(?<=\d)]', '', html) # remove right footnote bracket ] return html def parse_page(pagename, wiki):