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

Merge branch 'rename-handbook-sections' into 'develop'

rename handbook sections

See merge request R3/howto-cards!208
parents e8a18b3b ba83ac5d
No related branches found
No related tags found
No related merge requests found
...@@ -11,13 +11,11 @@ def line_prepender(filename, line): ...@@ -11,13 +11,11 @@ def line_prepender(filename, line):
def build_link(title, href): def build_link(title, href):
# strip the number of the title # strip the number of the title
if ('handbook-1-general' in href) or ('handbook-2-additional' in href) or ('handbook-3-annexes' in href): if ('handbook' in href) or ('handbook-additional' in href) or ('handbook-annexes' in href):
title = re.sub('[0-9.]', '', title).strip() title = re.sub('[0-9.]', '', title).strip()
# remove sym link reference in href # remove sym link reference in href
if ('handbook-1-general' in href): if ('handbook-2-additional' in href):
href = href.replace('handbook-1-general', 'handbook').strip()
elif ('handbook-2-additional' in href):
href = href.replace('handbook-2-additional', 'handbook').strip() href = href.replace('handbook-2-additional', 'handbook').strip()
elif ('handbook-3-annexes' in href): elif ('handbook-3-annexes' in href):
href = href.replace('handbook-3-annexes', 'handbook').strip() href = href.replace('handbook-3-annexes', 'handbook').strip()
......
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