All Versions
13
Latest Version
Avg Release Cycle
108 days
Latest Release
1393 days ago

Changelog History
Page 1

  • v0.12.1 Changes

    July 03, 2020

    ๐Ÿ›  This is a bugfix release.

    • ๐Ÿ›  Fixed [#176][issue-176]: Mention compile-time wrapping by linking to the [textwrap-macros crate].
    • ๐Ÿ›  Fixed [#193][issue-193]: Wrapping with break_words(false) was broken and would cause extra whitespace to be inserted when words were longer than the line width.
  • v0.12.0 Changes

    June 26, 2020

    โšก๏ธ The code has been updated to the [Rust 2018 edition][rust-2018] and ๐Ÿš€ each new release of textwrap will only support the latest stable ๐Ÿ”– version of Rust. Trying to support older Rust versions is a fool's errand: our dependencies keep releasing new patch versions that require newer and newer versions of Rust.

    The term_size feature has been replaced by terminal_size. The API is unchanged, it is just the name of the Cargo feature that changed.

    The hyphenation feature now only embeds the hyphenation patterns for US-English. This slims down the dependency.

    • ๐Ÿ›  Fixed [#140][issue-140]: Ignore ANSI escape sequences.
    • ๐Ÿ›  Fixed [#158][issue-158]: Unintended wrapping when using external splitter.
    • ๐Ÿ›  Fixed [#177][issue-177]: Update examples to the 2018 edition.
  • v0.11.0 Changes

    December 09, 2018

    ๐Ÿ‘ Due to our dependencies bumping their minimum supported version of โœ… Rust, the minimum version of Rust we test against is now 1.22.0.

    • ๐Ÿ”€ Merged [#141][issue-141]: Fix dedent handling of empty lines and trailing newlines. Thanks @bbqsrc!
    • ๐Ÿ›  Fixed [#151][issue-151]: Release of version with hyphenation 0.7.
  • v0.10.0 Changes

    April 28, 2018

    ๐Ÿ‘ Due to our dependencies bumping their minimum supported version of โœ… Rust, the minimum version of Rust we test against is now 1.17.0.

    • ๐Ÿ›  Fixed [#99][issue-99]: Word broken even though it would fit on line.
    • ๐Ÿ›  Fixed [#107][issue-107]: Automatic hyphenation is off by one.
    • ๐Ÿ›  Fixed [#122][issue-122]: Take newlines into account when wrapping.
    • ๐Ÿ›  Fixed [#129][issue-129]: Panic on string with em-dash.
  • v0.9.0 Changes

    October 05, 2017

    0๏ธโƒฃ The dependency on term_size is now optional, and by default this ๐Ÿ’ฅ feature is not enabled. This is a breaking change for users of Wrapper::with_termwidth. Enable the term_size feature to restore the old functionality.

    โž• Added a regression test for the case where width is set to usize::MAX, thanks @Fraser999! All public structs now implement Debug, thanks @hcpl!

    • ๐Ÿ›  Fixed [#101][issue-101]: Make term_size an optional dependency.
  • v0.8.0 Changes

    September 04, 2017

    The Wrapper stuct is now generic over the type of word splitter being used. This means less boxing and a nicer API. The ๐Ÿšš Wrapper::word_splitter method has been removed. This is a breaking API change if you used the method to change the word splitter.

    The Wrapper struct has two new methods that will wrap the input text lazily: Wrapper::wrap_iter and Wrapper::into_wrap_iter. Use those if you will be iterating over the wrapped lines one by one.

    • ๐Ÿ›  Fixed [#59][issue-59]: wrap could return an iterator. Thanks @hcpl!
    • Fixed [#81][issue-81]: Set html_root_url.
  • v0.7.0 Changes

    July 20, 2017

    ๐Ÿ”– Version 0.7.0 changes the return type of Wrapper::wrap from Vec<String> to Vec<Cow<'a, str>>. This means that the output lines ๐Ÿ’ฅ borrow data from the input string. This is a breaking API change if you relied on the exact return type of Wrapper::wrap. Callers of the ๐Ÿ‘€ textwrap::fill convenience function will see no breakage.

    The above change and other optimizations makes version 0.7.0 roughly 15-30% faster than version 0.6.0.

    ๐Ÿšš The squeeze_whitespace option has been removed since it was complicating the above optimization. Let us know if this option is โ†ช important for you so we can provide a work around.

    • ๐Ÿ›  Fixed [#58][issue-58]: Add a "fast_wrap" function.
    • ๐Ÿ›  Fixed [#61][issue-61]: Documentation errors.
  • v0.6.0 Changes

    May 22, 2017

    ๐Ÿ”– Version 0.6.0 adds builder methods to Wrapper for easy one-line ๐ŸŽ‰ initialization and configuration:

    let wrapper = Wrapper::new(60).break_words(false);
    

    It also add a new NoHyphenation word splitter that will never split words, not even at existing hyphens.

    • ๐Ÿ›  Fixed [#28][issue-28]: Support not squeezing whitespace.
  • v0.5.0 Changes

    May 15, 2017

    ๐Ÿ’ฅ Version 0.5.0 has breaking API changes. However, this only affects code using the hyphenation feature. The feature is now optional, so you will first need to enable the hyphenation feature as described above. Afterwards, please change your code from

    wrapper.corpus = Some(&corpus);
    

    to

    wrapper.splitter = Box::new(corpus);
    

    Other changes include optimizations, so version 0.5.0 is roughly 10-15% faster than version 0.4.0.

    • ๐Ÿ›  Fixed [#19][issue-19]: Add support for finding terminal size.
    • ๐Ÿ›  Fixed [#25][issue-25]: Handle words longer than self.width.
    • ๐Ÿ›  Fixed [#26][issue-26]: Support custom indentation.
    • ๐Ÿ›  Fixed [#36][issue-36]: Support building without hyphenation.
    • ๐Ÿ›  Fixed [#39][issue-39]: Respect non-breaking spaces.
  • v0.4.0 Changes

    January 24, 2017

    โœ… Documented complexities and tested these via cargo bench.

    • ๐Ÿ›  Fixed [#13][issue-13]: Immediatedly add word if it fits.
    • ๐Ÿ›  Fixed [#14][issue-14]: Avoid splitting on initial hyphens.