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.
- ๐ Fixed [#176][issue-176]: Mention compile-time wrapping by linking to
the [
-
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 byterminal_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.
- ๐ Merged [#141][issue-141]: Fix
-
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, 20170๏ธโฃ The dependency on
term_size
is now optional, and by default this ๐ฅ feature is not enabled. This is a breaking change for users ofWrapper::with_termwidth
. Enable theterm_size
feature to restore the old functionality.โ Added a regression test for the case where
width
is set tousize::MAX
, thanks @Fraser999! All public structs now implementDebug
, thanks @hcpl!- ๐ Fixed [#101][issue-101]: Make
term_size
an optional dependency.
- ๐ Fixed [#101][issue-101]: Make
-
v0.8.0 Changes
September 04, 2017The
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
andWrapper::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
.
- ๐ Fixed [#59][issue-59]:
-
v0.7.0 Changes
July 20, 2017๐ Version 0.7.0 changes the return type of
Wrapper::wrap
fromVec<String>
toVec<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 ofWrapper::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 fromwrapper.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.