feat: Add commas to block number OG image

This commit is contained in:
2026-02-25 22:31:33 +11:00
parent f0d233b2f6
commit 2df0001352

View File

@@ -330,6 +330,9 @@ def og_image():
value_max_length = 30 value_max_length = 30
display_value = _ellipsize_middle(search_value, value_max_length) display_value = _ellipsize_middle(search_value, value_max_length)
# Check if value is a whole number > 100 and format with commas
if search_value.isdigit() and int(search_value) > 100:
display_value = f"{int(search_value):,}"
value_font_size = "30" value_font_size = "30"
if len(display_value) > 34: if len(display_value) > 34:
value_font_size = "26" value_font_size = "26"