diff --git a/.gitignore b/.gitignore
index b2ec6f6..eb3d1db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,6 +74,8 @@ instance/
/doc
/docusaurus
+*.DS_Store
+
# PyBuilder
.pybuilder/
target/
diff --git a/templates/doc/module.html.jinja2 b/templates/doc/module.html.jinja2
index 9f0ffc6..b376ed6 100644
--- a/templates/doc/module.html.jinja2
+++ b/templates/doc/module.html.jinja2
@@ -209,7 +209,11 @@ See https://pdoc.dev/docs/pdoc/render_helpers.html#DefaultMacroExtension for an
{% enddefaultmacro %}
{% defaultmacro docstring(var) %}
{% if var.docstring %}
-
{{ var.docstring | to_markdown | to_html | linkify(namespace=var.qualname) }}
+ {% set processed_docstring = var.docstring
+ | replace('\n ', '\n ')
+ | replace('\n ', '\n- ')
+ %}
+ {{ processed_docstring | to_markdown | to_html | linkify(namespace=var.qualname) }}
{% endif %}
{% enddefaultmacro %}
{% defaultmacro nav_members(members) %}
diff --git a/templates/docusaurus/module.html.jinja2 b/templates/docusaurus/module.html.jinja2
index d5cb97c..698d558 100644
--- a/templates/docusaurus/module.html.jinja2
+++ b/templates/docusaurus/module.html.jinja2
@@ -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 %}
@@ -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) %}