pdoc3 / pdoc3/pdoc

References stop working after backticks used in link text

Open
#236 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

A similar problem to #134 occurs after backticks have been used within a link text.

Code:

`Picture` object: A
[`tikzpicture` environment](https://pgf-tikz.github.io/pgf/pgfmanual.pdf#subsubsection.12.2.1)
is represented by a `Picture` object.

Result:

image

The `Picture` before the explicit link is automatically linked to the description of that class, but after the backticks in the text of the explicit link, it just becomes a normal code span. This effect persists until the end of the respective docstring, across paragraph boundaries.

I suspect regular expressions are not sufficient to parse Markdown syntax.

A workaround is to use html <code> tags in the link text:

`Picture` object: A
[<code>tikzpicture</code> environment](https://pgf-tikz.github.io/pgf/pgfmanual.pdf#subsubsection.12.2.1)
is represented by a `Picture` object.

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 supplied docstring example with backticks inside explicit link text and inspect the Markdown and reference-link parsing entry points. Done means references after such a link remain linked correctly across paragraph boundaries, while the link text still renders as code.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, python
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.