Skip to content

Commit a9147e5

Browse files
authored
fix: Paginator.create_from_list no longer misses overflowing strings (#1574)
1 parent 633da19 commit a9147e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interactions/ext/paginators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,13 @@ def create_from_list(
245245
pages = []
246246
page = ""
247247
for entry in content:
248+
if len(entry) > page_size:
249+
continue
248250
if len(page) + len(f"\n{entry}") <= page_size:
249251
page += f"{entry}\n"
250252
else:
251253
pages.append(Page(page, prefix=prefix, suffix=suffix))
252-
page = ""
254+
page = "f{entry}\n"
253255
if page != "":
254256
pages.append(Page(page, prefix=prefix, suffix=suffix))
255257
return cls(client, pages=pages, timeout_interval=timeout)

0 commit comments

Comments
 (0)