Skip to content

Commit dbf263d

Browse files
committed
fix: Propagate Zensical's zrelpath processor
1 parent 4e66617 commit dbf263d

File tree

1 file changed

+4
-0
lines changed
  • src/mkdocstrings/_internal/handlers

1 file changed

+4
-0
lines changed

src/mkdocstrings/_internal/handlers/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,10 @@ def _update_env(self, md: Markdown, *, config: Any | None = None) -> None:
477477
relpath = md.treeprocessors["relpath"]
478478
new_relpath = type(relpath)(relpath.file, relpath.files, relpath.config) # type: ignore[attr-defined,call-arg]
479479
new_md.treeprocessors.register(new_relpath, "relpath", priority=0)
480+
elif "zrelpath" in md.treeprocessors:
481+
zrelpath = md.treeprocessors["zrelpath"]
482+
new_zrelpath = type(zrelpath)(new_md, zrelpath.path, zrelpath.use_directory_urls) # type: ignore[attr-defined,call-arg]
483+
new_md.treeprocessors.register(new_zrelpath, "zrelpath", priority=0)
480484

481485
self._md = new_md
482486

0 commit comments

Comments
 (0)