Skip to content

Commit

Permalink
sphinx-agent: Ensure relative paths are resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Sep 9, 2023
1 parent 339074e commit 7cde249
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/esbonio/esbonio/sphinx_agent/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def _build_file_mapping(app: Sphinx) -> Dict[str, str]:
for doc in included_docs:
mapping[env.doc2path(doc)] = mapping[env.doc2path(parent_doc)]

# Ensure any relative paths in included docs are resolved.
mapping = {str(pathlib.Path(d).resolve()): uri for d, uri in mapping.items()}

return mapping


Expand Down

0 comments on commit 7cde249

Please sign in to comment.