Skip to content

Commit a4bff7f

Browse files
committed
Update bullet point addition helper function to use ". " rather than "." and re-add float precision to percentages
1 parent a62cef8 commit a4bff7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/alttxt/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def add_bullet_points(text: str) -> str:
9999
text = text.strip()
100100
text = "* " + text
101101

102-
parts = text.split('.')
102+
parts = text.split('. ')
103103
if len(parts) > 1:
104-
return '.\n*'.join(parts[:-1]) + '.' + parts[-1]
104+
return '.\n* '.join(parts[:-1]) + '. ' + parts[-1]
105105
return text
106106

107107
# Construct the dictionary for markdown content

src/alttxt/tokenmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def calculate_max_min_set_presence(self, maxmin_sized_set_name) -> str:
673673
(maxmin_set_count / total_non_empty) * 100 if total_non_empty else 0
674674
)
675675

676-
return f"{round(maxmin_set_percentage)}%"
676+
return f"{round(maxmin_set_percentage, 1)}%"
677677

678678
def calculate_max_intersection(self) -> dict[str, int]:
679679
"""

0 commit comments

Comments
 (0)