From 31ae72ba6a18b906d48c8054eb12d121378cbd5b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 28 Jan 2025 14:20:12 +0100 Subject: [PATCH] schema: property ReST docs: correctly separate nested list from parent This fixes the reStructuredText (ReST) output for more complex formats where we got, for example, a definition list of all properties of a (section) configuration with one or more properties then having a sub-format that is also rendered as a list. Such nested lists are possible in ReST but need to be separated by a blank line [0]. Without this we got quite a few warnings/errors from the Sphinx/ReST buildsystem looking like: > config/datastore/config.rst:19: ERROR: Unexpected indentation. > config/datastore/config.rst:20: WARNING: Block quote ends without a blank line; unexpected unindent. [0]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#lists-and-quote-like-blocks Reported-by: Maximiliano Sandoval Signed-off-by: Thomas Lamprecht --- proxmox-schema/src/format.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxmox-schema/src/format.rs b/proxmox-schema/src/format.rs index 11d6605d..080b0268 100644 --- a/proxmox-schema/src/format.rs +++ b/proxmox-schema/src/format.rs @@ -174,6 +174,9 @@ pub fn dump_properties( ParameterDisplayStyle::ConfigSub, &[], ); + if !sub_text.is_empty() { + param_descr.push_str("\n\n"); + } param_descr.push_str(&sub_text); } Schema::Array(_) => {