Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link-targets are linkified but shouldn't #342

Closed
jstriebel opened this issue Feb 3, 2022 · 5 comments
Closed

Link-targets are linkified but shouldn't #342

jstriebel opened this issue Feb 3, 2022 · 5 comments
Labels

Comments

@jstriebel
Copy link
Contributor

Problem Description

If an identifier is part of a link-target it is re-linked by linkify, breaking the original a-tag.
This is similar to #335, but concerns the target instead.

Steps to reproduce the behavior:

  1. In a docstring, add link a valid identifier (e.g. mymodule) is part of the target, e.g. [my link](https://mymodule.org).
  2. The result is hmtl similar to <a href="[https://<a href=](https://%3Ca%20href%3D/)"../../mymodule.html#org">mymodule.org</a>">my_link</a>.

System Information

pdoc: 9.0.1
Python: 3.7.3
Platform: Linux-4.19.0-18-amd64-x86_64-with-debian-10.11

@jstriebel jstriebel added the bug label Feb 3, 2022
@mhils
Copy link
Member

mhils commented Feb 3, 2022

Could you provide a full repro please?

mhils added a commit that referenced this issue Feb 3, 2022
@mhils
Copy link
Member

mhils commented Feb 3, 2022

I may have fixed that with 4688086, but it depends a bit on what your actual URL looks like. :)

@jstriebel
Copy link
Contributor Author

Thanks! I tried your newest commit, but it does not fix my case unfortunately. Running pdoc mymodule on the unpacked mymodule.zip yields:
Screenshot from 2022-02-03 17-18-06

<p><a href="[http://<a href=](http://%3Ca%20href%3D/)"#org">mymodule.org</a>">some link</a></p>

@mhils
Copy link
Member

mhils commented Feb 3, 2022

After unzipping mymodule.zip and running pdoc mymodule, I get a page that looks correct:

$ pdoc --version
pdoc: 9.0.1 (+7, commit 4688086)
Python: 3.10.0
Platform: Windows-10-10.0.19044-SP0

@jstriebel
Copy link
Contributor Author

@mhils Indeed, this issue is fixed, I messed up installing the correct version first. Sorry for this and the late reply! And thank you very much for your responsiveness and maintaining this great project 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants