From 991262892c2f1b69fa709e582ab6a3b833a205ae Mon Sep 17 00:00:00 2001 From: p1003 Date: Fri, 5 Dec 2025 11:26:15 +0100 Subject: [PATCH 1/2] fix RoomConfig attributes display in docs --- templates/docusaurus/module.html.jinja2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) %} From 5d3aa26cff9c398a7b3e78fef7e9b4d10b4d6947 Mon Sep 17 00:00:00 2001 From: p1003 Date: Fri, 5 Dec 2025 11:40:55 +0100 Subject: [PATCH 2/2] update main docs as well --- .gitignore | 2 ++ templates/doc/module.html.jinja2 | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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) %}