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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-05-02 17:50:36 +08:00
parent 79e8c4f9e8
commit d1aacf555e

View File

@ -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,