Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
- quick fix the relative paths
  • Loading branch information
dkuegler authored Apr 12, 2024
1 parent ba6e2fb commit 489107f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def linkcode_resolve(domain, info):
# change occurs, but different (different repl str) replacements are not combined
# "^\\/overview\\/intro\\.md#": "/overview/index.rst#",
"^/?(.*)#(.*)ubuntu-(\\d{2})(\\d{2})": ("/\\1#\\2ubuntu-\\3-\\4",),
"^/readme\\.md(#.*)?$": ("/index.rst\\1", "/overview/intro.rst\\1"),
"^/?readme\\.md(#.*)?$": ("/index.rst\\1", "/overview/intro.rst\\1"),
"^/?(overview/)?intro(\\.rst)?(#.*)?$": ("/overview/index.rst\\3",),
"^/?(singularity|docker)/readme\\.md(#.*)?$": ("/overview/\\1.md\\2",),
f"^/?({'|'.join(_script_dirs)})/readme\\.md(#.*)?$": ("/scripts/\\1.rst\\2",),
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx_ext/fix_links/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def resolve_xref(
source = node.attributes[attr]
relpath = str(Path(env.srcdir).relative_to(Path.cwd()))
# TODO fix hardcoded doc here
for prefix in (str(env.srcdir), relpath, "../", "../doc"):
for prefix in (str(env.srcdir), relpath, "../", "doc", "../doc"):
if orig_source.startswith(prefix):
source = orig_source.removeprefix(prefix)
# maybe this already fixed the path?
Expand Down

0 comments on commit 489107f

Please sign in to comment.