mitmproxy / mitmproxy/pdoc

Trying to link to a nested module causes broken links

Open
#808 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.5k
Forks
228
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with module/init.py linking to module.nested and module/nested.py, then inspect pdoc's Markdown link generation using the malformed HTML as the failure signal. Done means the nested link renders as a valid anchor pointing to the nested module without duplicated or broken markup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.