diff --git a/dumas_image_nodes.py b/dumas_image_nodes.py index 7a2734b..b6d3f9f 100644 --- a/dumas_image_nodes.py +++ b/dumas_image_nodes.py @@ -268,11 +268,17 @@ def _format_height_text(feet, inches): inches_value = str(inches or "").strip() if not feet_value and not inches_value: return "" - if not feet_value: - return f'{int(inches_value)}"' - if not inches_value: - return f"{int(feet_value)}'" - return f'{int(feet_value)}\'{int(inches_value)}"' + + parts = [] + if feet_value: + feet_number = int(feet_value) + parts.append(f"{feet_number} foot" if feet_number == 1 else f"{feet_number} feet") + if inches_value: + inches_number = int(inches_value) + parts.append( + f"{inches_number} inch" if inches_number == 1 else f"{inches_number} inches" + ) + return " ".join(parts) def _ensure_sentence(value): diff --git a/tests/test_dumas_image_nodes.py b/tests/test_dumas_image_nodes.py index 2339715..93f4c29 100644 --- a/tests/test_dumas_image_nodes.py +++ b/tests/test_dumas_image_nodes.py @@ -266,7 +266,7 @@ class DumasImageNodeTests(unittest.TestCase): " is the primary full-body reference for Dave.\n" " is a frontal facial reference for Dave.\n" 'The character ID string is "char_dave".\n' - "Dave is 6'2\" tall.\n" + "Dave is 6 feet 2 inches tall.\n" "Dave has a northern English accent.\n" "wears a long grey coat." ),