Skip to content

Commit

Permalink
a little cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nelliemckesson committed Sep 7, 2023
1 parent 8f63efe commit 4f76bbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/create_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@ def collect_xref_internal_inks(line, filepath, output_dir, adoc_dir):
return

def collect_simple_internal_links(line, filepath, mainfile, output_dir, adoc_dir):
# <<overlay_prefix,overlay_prefix>>
# looking for links like this: <<overlay_prefix,overlay_prefix>>
for m in re.finditer(r'<<(.+?),(.+?)>>', line):
anchor = m.group(1)
link_path = re.sub(adoc_dir, "", mainfile)
link_path = re.sub("^/", "", link_path)
link_path = os.path.normpath(link_path)
link_relpath = os.path.relpath(link_path, adoc_dir)
# linkinfo = {'url': link_relpath}
linkinfo = {'url': link_path}
if anchor:
linkinfo['anchor'] = anchor
Expand Down

0 comments on commit 4f76bbb

Please sign in to comment.