From 80eb4f42fb02ff98190fb8cc1aab8d96a92f5a9e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 11 May 2021 15:50:02 +0800 Subject: [PATCH] doc/_ext: print "default" using "literal" filter there is chance that the default value of an option is empty, before this change the rendered result would be "````", and sphinx is confused at seeing this: Unexpected section title or transition. as it takes it as a notion of section title. after this change, the "literal" filter is always applied to the default value, so an empty string is rendered like "" instead. 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 ffe036a6b93f1..524c6bc2b75b6 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -41,7 +41,7 @@ TEMPLATE = ''' {%- elif opt.type == 'bool' %} :default: ``{{ default | string | lower }}`` {%- else %} - :default: ``{{ default }}`` + :default: {{ default | literal }} {%- endif -%} {%- endif %} {%- if opt.enum_values %} -- 2.39.5