Skip to content

Commit dd3a0dc

Browse files
SilverRainZMiMoCode
andcommitted
fix: Prepend leading slash to docname in path2doc
Co-authored-by: MiMoCode <mimo@xiaomi.com>
1 parent 445c85e commit dd3a0dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sphinxnotes/recentupdate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def get_git_revisions(
198198
def path2doc(repo: Repo, env: BuildEnvironment, blob_path: str) -> str | None:
199199
"""Convert a git repo-relative blob path to a Sphinx document name."""
200200
docname = env.path2doc(path.join(repo.working_dir, blob_path))
201-
return docname if (docname and not path.isabs(docname)) else None
201+
return '/' + docname if (docname and not path.isabs(docname)) else None
202202

203203

204204
def collect_revisions(

0 commit comments

Comments
 (0)