From 659d01dcb53285123efe56f01089694b12a8d845 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 2 May 2021 19:57:27 +0800 Subject: [PATCH] doc/_ext: ignore desc if it is unavailable there is chance that we don't have desc, desc_long or fmt_desc, in that case, we should just skip desc before checking its length. so, just use 'if desc' which is able to check for None or empty string. Signed-off-by: Kefu Chai --- doc/_ext/ceph_confval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 4d48664c92714..e7b669b88f6bd 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -19,7 +19,7 @@ logger = logging.getLogger(__name__) TEMPLATE = ''' .. confval_option:: {{ opt.name }} -{% if desc | length > 1 %} +{% if desc %} {{ desc | wordwrap(70) | indent(3) }} {% endif %} :type: ``{{opt.type}}`` -- 2.39.5