1.0.0
Features
- Added
use_wcwidthfor wide and fullwidth character support by @DenverCoder1 in #63 - Added the ability to merge cells with
Merge.LEFTby @DenverCoder1 in #67 - Alignment is now an
IntEnumso numbers 0-2 can be passed toalignmentsby @DenverCoder1 in #75 - Added custom exception classes by @DenverCoder1 in #74
- Added
PresetStyles.double_thin_boxstyle (this is the style used in the TableStyle docs) by @DenverCoder1 in #67
Breaking Changes
- The library now uses
wcwidthfor 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=Falsetotable2ascii. - 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.Optionshas a new optionuse_wcwidth. All options are required when manually creating anOptionsobject.- Eight new fields have been added to
TableStyle. If you are manually creating aTableStyleobject, 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_extensionsif not using Python 3.8+ by @DenverCoder1 in #61 - Refactored comment style and reduced nesting complexity by @DenverCoder1 in #65
table2asciinow accepts allSequencecompatible objects instead of onlylistby @DenverCoder1 in #78- Use
sphinx-book-themefor docs by @DenverCoder1 in #79
Full Changelog: 0.5.0...1.0.0