alot
alot copied to clipboard
Support wrapping column text over multiple lines
This PR adds text wrapping for regular text fields to help address issue #1418.
It adds text wrapping support for thread parts like authors, subject, and content but not for tags.
To make a thread part wrappable, use the following config:
# width = 'wrap', min-width, max-width, min-lines, max-lines
width = 'wrap', 40, 40, 2, 2
This results in thread lines like:
A few notes:
- The new tuple validation in configobj takes the same form as proposed in #1633.
- For readability, it seems like it would be good to support textwrap.wrap()'s initial_indent and subsequent_indent arguments to better delineate the start of wrapped parts and their subsequent lines, but for the sake of simplicity, that is left for a follow-up PR.
- These changes do not yet include documentation updates, but I am happy to add those here or in a later PR if this feature addition looks good to you.
I added some missing docs, rebased to incorporate width_tuple validation updates, and added more configobj tests. I think this is ready for review.