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

Links to modules are not generated in 10.0.2 #360

Closed
vlad-nn opened this issue Mar 8, 2022 · 2 comments
Closed

Links to modules are not generated in 10.0.2 #360

vlad-nn opened this issue Mar 8, 2022 · 2 comments
Labels

Comments

@vlad-nn
Copy link

vlad-nn commented Mar 8, 2022

Problem Description

Links to modules are not generated in 10.0.2. They are generated as <code>, instead of <a>.
Was working in 10.0.1.

Steps to reproduce the behavior:

  1. Create pkg directory
  2. In pkg directory create __init__.py file with the following contents:
"""
This should be a link: `pkg.mod1`

This link is correct: `pkg.mod1.mod1_f1`
"""
import pkg.mod1
  1. Also create mod1.py file with the following contents:
def mod1_f1():
	""" Some function """
	pass
  1. Install pdoc 10.0.2
  2. Run pdoc:
    pdoc pkg -o out
  3. Look out/pkg.html:
<div class="docstring"><p>This should be a link: <code>pkg.mod1</code></p>
<p>This link is correct: <code><a href="pkg/mod1.html#mod1_f1">pkg.mod1.mod1_f1</a></code></p>
</div>

Problem:
<code>pkg.mod1</code></p> is not a link anymore. Used to be a link in 10.0.1 and below.

System Information

pdoc: 10.0.2
Python: 3.8.12 Platform: Windows-10-10.0.19042-SP0

@vlad-nn vlad-nn added the bug label Mar 8, 2022
@mhils
Copy link
Member

mhils commented Mar 8, 2022

Thanks for the clear repro! f179a08 is the first bad commit, I'll take a look.

@mhils mhils closed this as completed in 183e445 Mar 8, 2022
@mhils
Copy link
Member

mhils commented Mar 8, 2022

Thanks again for catching this! 10.0.3 is going through CI right now and should be out in about 10mins. :)

We didn't have a test for this specific case, but we do now. 🙃

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