Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ instance/
/doc
/docusaurus

*.DS_Store

# PyBuilder
.pybuilder/
target/
Expand Down
6 changes: 5 additions & 1 deletion templates/doc/module.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ See https://pdoc.dev/docs/pdoc/render_helpers.html#DefaultMacroExtension for an
{% enddefaultmacro %}
{% defaultmacro docstring(var) %}
{% if var.docstring %}
<div class="docstring">{{ var.docstring | to_markdown | to_html | linkify(namespace=var.qualname) }}</div>
{% set processed_docstring = var.docstring
| replace('\n ', '\n ')
| replace('\n ', '\n- ')
%}
<div class="docstring">{{ processed_docstring | to_markdown | to_html | linkify(namespace=var.qualname) }}</div>
{% endif %}
{% enddefaultmacro %}
{% defaultmacro nav_members(members) %}
Expand Down
12 changes: 10 additions & 2 deletions templates/docusaurus/module.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

{% block module_info %}
{% if module.docstring and ".. include::" not in module.docstring %}
{{ module.docstring | safe }}
{{ module.docstring
| replace('\n ', '\n ')
| replace('\n ', '\n- ')
| safe
}}
{% endif %}
{% endblock %}

Expand Down Expand Up @@ -89,7 +93,11 @@ class {{ cls.qualname }}{{ class_bases(cls) }}:
```python
{% if doc.kind == "class" %}{{ class(doc) }}{% elif doc.kind == "function" %}{{ function(doc) }}{% else %}{{ variable(doc) }}{% endif %}
```
{{ doc.docstring | safe }}
{{ doc.docstring
| replace('\n ', '\n ')
| replace('\n ', '\n- ')
| safe
}}
{% enddefaultmacro %}

{% defaultmacro is_public(doc) %}
Expand Down