Skip to content

Hyperlink reference gets parsed as docstring reference #698

@HackXIt

Description

@HackXIt

Problem Description

I have a hyperlink in the form of [alt-name](https://some.url.com).

I would expect that this hyperlink gets added as a link to the specified web-page.
However, the URL of that link contains a notation that is identical to a reference for a docstring.

This results in the URL not being an external link, but rather it gets parsed as a docstring reference.

Real example:

"""
...
Further details about this can also be found in the [LVGL forum post where this was discussed](https://forum.lvgl.io/t/how-can-i-store-a-jpg-using-micropython-and-lvgl-snapshot/15135?u=hackxit).
...
"""

grafik

Steps to reproduce the behavior:

  1. Have a docstring reference which matches the dot-notation of a URL (e.g. module named url)
  2. Place the URL into a docstring: [alt-name](https://some.url.com)
  3. Hyperlink is parsed as docstring reference

System Information

pdoc: 14.5.0
Python: 3.11.2
Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions