1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# Only load lorem ipsum for tests
--- a/jaraco/text/__init__.py
+++ b/jaraco/text/__init__.py
@@ -181,6 +181,7 @@
Wrap lines of text, retaining existing newlines as
paragraph markers.
+ >>> lorem_ipsum: str = files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
>>> print(wrap(lorem_ipsum))
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
@@ -213,6 +214,7 @@
r"""
Given a multi-line string, return an unwrapped version.
+ >>> lorem_ipsum: str = files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
>>> wrapped = wrap(lorem_ipsum)
>>> wrapped.count('\n')
20
@@ -229,11 +231,6 @@
return '\n'.join(cleaned)
-lorem_ipsum: str = (
- files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
-)
-
-
class Splitter:
"""object that will split a string with the given arguments for each call
|