pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.11k stars 143 forks source link

Incorrectly rendered Args section #429

Closed varontron closed 8 months ago

varontron commented 8 months ago

Recently migrated from an M1 to M2 mac. Previous successful invocation of pdoc was on M1 with Ventura 13.6, same python version. Is there a prerequisite I'm missing, or maybe need to downgrade a dependency, or is this due to an unreported error in my docstrings somewhere else in the module?

Example Source code:

"""

  Args:  
      script_path (str, optional): the full s3 or github uri, or local path to the script you want the service to execute. Defaults to "./script.py".  

"""

Expected Behavior

Correctly rendered Args section, from previous invocation e.g.,

<h2 id="args">Args</h2> 
<dl>
<dt><strong><code>script_path</code></strong> :&ensp;<code>str</code>, optional</dt>
<dd>the full s3 or github uri, or local path to the script you want the service to execute. Defaults to "./script.py".</dd>
</dl>

Actual Behavior

Incorrectly rendered Args section

<p>Args:<br>
script_path (str, optional): the full s3 or github uri, or local path
to the script you want the service to execute. Defaults to "./script.py".
</p>

Steps to Reproduce

  1. Executed pdoc -f -o html --html mymod

Additional info

varontron commented 8 months ago

The problem was caused by trailing spaces after Args:

This fails: Args: This succeeds: Args:

I likely did a find/replace at some point that fouled everything.