forked from docs/doc-exports
drop anchor links to figures
This commit is contained in:
parent
6110707001
commit
6a28ae6c96
11
process.py
11
process.py
@ -177,6 +177,17 @@ def main():
|
||||
for lnk in proc.find_all("a"):
|
||||
href = lnk.get('href')
|
||||
if href:
|
||||
# Drop anchor links to "Figure"s
|
||||
if (
|
||||
(lnk.content and lnk.content.startswith('Figure'))
|
||||
or
|
||||
(
|
||||
lnk.contents
|
||||
and ''.join(lnk.contents).startswith('Figure')
|
||||
)
|
||||
):
|
||||
lnk.unwrap()
|
||||
else:
|
||||
page_url = ''
|
||||
anchor = ''
|
||||
href_parts = href.split('#')
|
||||
|
Loading…
x
Reference in New Issue
Block a user