adding a regex to remove the [] from footnotes
This commit is contained in:
parent
d331964a64
commit
1a0c35dc03
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user