@ -170,7 +170,7 @@ class Paginator:
item = str(item)
i = 0
if not keep_intact and not item == self._page_break:
item_parts = item.split('\n')
item_parts = item.strip().split('\n')
for part in item_parts:
if len(part) > self._max_line_length:
length = 0