This commit is contained in:
Kovid Goyal 2024-09-10 22:12:13 +05:30
parent 0dafe305c9
commit e80fdf55b7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -250,7 +250,7 @@ def fmt_sidx(i, fmt='%.2f', use_roman=False):
i = float(i)
except Exception:
return str(i)
if int(i) == float(i):
if int(i) == i:
return roman(int(i)) if use_roman else '%d'%int(i)
ans = fmt%i
if '.' in ans: