1.0.0
Features
- Added
use_wcwidth
for wide and fullwidth character support by @DenverCoder1 in #63 - Added the ability to merge cells with
Merge.LEFT
by @DenverCoder1 in #67 - Alignment is now an
IntEnum
so numbers 0-2 can be passed toalignments
by @DenverCoder1 in #75 - Added custom exception classes by @DenverCoder1 in #74
- Added
PresetStyles.double_thin_box
style (this is the style used in the TableStyle docs) by @DenverCoder1 in #67
Breaking Changes
- The library now uses
wcwidth
for determining the length of a cell instead oflen()
.- The
wcswidth()
function takes into account double-width characters (East Asian Wide and East Asian Fullwidth) and zero-width characters (combining characters, zero-width space, etc.), whereaslen()
determines the width solely based on the number of characters in the string. - In most cases, this will not affect the output of
table2ascii
. - To revert to using
len()
instead ofwcswidth()
passuse_wcwidth=False
totable2ascii
. - Note: The width of East Asian Wide and East Asian Fullwidth characters is up to the platform and font used. If the font used to display the wide characters does not make them take up exactly 2 character width, it may still not display correctly.
- The
table2ascii.options.Options
has a new optionuse_wcwidth
. All options are required when manually creating anOptions
object.- Eight new fields have been added to
TableStyle
. If you are manually creating aTableStyle
object, you can now provide symbols for the edges of merged table cells. This is not a mandatory change, but a warning will be printed if you do not provide these fields.
Meta
- New annotation style from Python 3.9+ (backwards compatible) by @DenverCoder1 in #61
- Only installs
typing_extensions
if not using Python 3.8+ by @DenverCoder1 in #61 - Refactored comment style and reduced nesting complexity by @DenverCoder1 in #65
table2ascii
now accepts allSequence
compatible objects instead of onlylist
by @DenverCoder1 in #78- Use
sphinx-book-theme
for docs by @DenverCoder1 in #79
Full Changelog: 0.5.0...1.0.0