pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

Trying to link to a nested module causes broken links

Open kaathewisegit opened this issue 8 months ago • 0 comments

Problem Description

I have a package with several nested modules. I wanted to refer to them by their names, without prefixing the package name, so I used a [nested](module.nested) Markdown link. This broke link generation.

Steps to reproduce the behavior:

Create module/. Inside it:

# module/__init__.py
"""
[nested](module.nested)
"""

# module/nested.py
"""Hello there"""

This generates the following HTML:

<div class="docstring">
  <p>
    <a href="<a href=" module="" nested.html"="">module.nested</a>"&gt;nested
  </p>
</div>

System Information

$ pdoc --version
pdoc: 15.0.3
Python: 3.12.10
Platform: Linux-6.12.28-0-lts-x86_64-with

kaathewisegit avatar May 17 '25 12:05 kaathewisegit