Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,10 @@ def image_name_to_image_src(img_name):

# add correct id to all headings:
html_soup = BeautifulSoup(html_rendered, 'html.parser')
for h in ("h1", "h2", "h3", "h4", "h5"):
for header_soup_representation in html_soup.find_all(h):
if header_soup_representation.find('a'):
header_soup_representation['id'] = header_soup_representation.a['id']
#for h in ("h1", "h2", "h3", "h4", "h5"):
# for header_soup_representation in html_soup.find_all(h):
# if header_soup_representation.find('a'):
# header_soup_representation['id'] = header_soup_representation.a['id']
# ToDo: Implement these nice anchor svg icons GitHub displays next to every heading
# link_within_header = header_soup_representation.a
# link_within_header.append(BeautifulSoup(GITHUB_LINK_ANCHOR, 'html.parser').find("svg"))
Expand Down