Skip to content
Snippets Groups Projects
Commit 28a880b3 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'fix-hrefs-handbook' into 'develop'

fix hrefs in links of handbook

See merge request !188
parents 1d6118c6 52ae37be
No related branches found
No related tags found
3 merge requests!197[release] Regular merge of develop,!190[release] Regular merge of develop,!188fix hrefs in links of handbook
Pipeline #35246 passed
......@@ -11,9 +11,17 @@ def line_prepender(filename, line):
def build_link(title, href):
# strip the number of the title
if ('handbook:1-general' in href) or ('handbook:2-additional' in href):
if ('handbook-1-general' in href) or ('handbook-2-additional' in href) or ('handbook-3-annexes' in href):
title = re.sub('[0-9.]', '', title).strip()
# remove sym link reference in href
if ('handbook-1-general' in href):
href = href.replace('handbook-1-general', 'handbook').strip()
elif ('handbook-2-additional' in href):
href = href.replace('handbook-2-additional', 'handbook').strip()
elif ('handbook-3-annexes' in href):
href = href.replace('handbook-3-annexes', 'handbook').strip()
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
def build_section_start(title, shortcut):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment