diff --git a/recipes.py b/recipes.py index 2d6f0a5..c037e30 100644 --- a/recipes.py +++ b/recipes.py @@ -281,7 +281,13 @@ class Builder: def numprint(input: int) -> str: out = str(input) if out.endswith(".0"): - return out.split(".")[0] + out = out.split(".")[0] + if out == "0.5": + return "1/2" + elif out == "0.25": + return "1/4" + elif out == "0.75": + return "3/4" return out self.jinjaenv.filters['numprint'] = numprint