From d1aacf555e5f4dfb8d1fece7ce1431cff7ca49eb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 2 May 2021 17:50:36 +0800 Subject: [PATCH] doc/_ext: print 0B if option value is 0 before this change, the rendered Default is "0Ei" if the default size is 0, would be more readable if it is "0B" or "0". Signed-off-by: Kefu Chai --- doc/_ext/ceph_confval.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 98c5e2ff949..437678812a6 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -108,6 +108,8 @@ def do_plain_num(value: str, typ: str) -> str: def iec_size(value: int) -> str: + if value == 0: + return '0B' units = dict(Ei=60, Pi=50, Ti=40, -- 2.39.5