We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1db755 commit 2a786afCopy full SHA for 2a786af
adafruit_display_text/__init__.py
@@ -53,12 +53,13 @@ def chunks(lst, n):
53
for part in chunks(w, max_chars - 1):
54
parts.append("{}-".format(part))
55
the_lines.extend(parts[:-1])
56
- # Remove the last hyphen on the last chunk
57
the_line = parts[-1][:-1]
58
continue
59
60
if len(the_line + " " + w) <= max_chars:
61
the_line += " " + w
+ elif not the_line and len(w) == max_chars:
62
+ the_lines.append(w)
63
else:
64
the_lines.append(the_line)
65
the_line = "" + w
0 commit comments