mitmproxy / mitmproxy/pdoc

Auto link to realized generics referenced in documentation

Open
#861 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem Description

pdoc will generate links to symbols enclosed in back-ticks, where it recognizes those symbols; `Foo` would be rendered as a hyperlink to the documentation for the Foo symbol.

This does no seem to occur with references to realized generics; `Foo[Bar,Wibble]` does not generate a hyperlink, even if Foo, Bar, and/or Wibble are symbols in context.

Proposal

When parsing back-tick references, support syntax for generic realizations and insert hyperlinks for recognized symbols.

Alternatives

Could write `Foo` `[` `Bar` `,` `Wibble` `]` - but this is very messy and I think this still generates breaks between each monospaced element: Foo [ Bar , Wibble ].

Additional context

When reviewing generated documentation we can spot items which are missing from public API docs as they are not hyperlinked.

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

No file, test, or entry point is named. Locate the parser for back-tick references and existing hyperlink tests, then verify that recognized symbols inside Foo[Bar,Wibble] are linked without splitting the reference into separate monospaced elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.