diff options
| author | 2020-06-27 21:19:49 -0400 | |
|---|---|---|
| committer | 2020-06-27 22:53:10 -0400 | |
| commit | 0e223f7f197419ec99d6a00996c5d2c980c57c38 (patch) | |
| tree | 5b0e7f24ef5a2a379ff98c843f16d84af254933a | |
| parent | Improve LinePaginator docstrings (diff) | |
Add block comments to LinePaginator.add_line()
| -rw-r--r-- | bot/pagination.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/pagination.py b/bot/pagination.py index 71e385020..441a63a7b 100644 --- a/bot/pagination.py +++ b/bot/pagination.py @@ -96,6 +96,7 @@ class LinePaginator(Paginator): log.debug("Could not continue to next page, truncating line.") line = line[:self.scale_to_size] + # Check if we should start a new page or continue the line on the current one if self.max_lines is not None and self._linecount >= self.max_lines: log.debug("max_lines exceeded, creating new page.") self._new_page() @@ -112,6 +113,7 @@ class LinePaginator(Paginator): self._current_page.append('') self._count += 1 + # Start a new page if there were any overflow words if remaining_words: self._new_page() self.add_line(remaining_words) |