word-wrap 0.1.1 → 0.1.2
raw patch · 4 files changed
+10/−3 lines, 4 files
Files
- CHANGELOG.md +7/−0
- src/Text/Wrap.hs +1/−1
- tests/Main.hs +1/−1
- word-wrap.cabal +1/−1
CHANGELOG.md view
@@ -1,4 +1,11 @@ +0.1.2+=====++Bug fixes:+ * Fixed a bug where multiple consecutive newlines were not properly preserved+ as advertised (#2)+ 0.1.1 =====
src/Text/Wrap.hs view
@@ -49,7 +49,7 @@ -- ^ A single line of text. -> [T.Text] wrapLine limit t =- let go [] = []+ let go [] = [T.empty] go [WS _] = [] go [tok] = [tokenContent tok] go ts =
tests/Main.hs view
@@ -17,7 +17,7 @@ wrapTextToLines 10 " Hello, World!" `shouldBe` [" Hello,", "World!"] it "honors preexisting newlines" $ do- wrapTextToLines 100 "Hello,\nWorld!" `shouldBe` ["Hello,", "World!"]+ wrapTextToLines 100 "Hello,\n\nWorld!" `shouldBe` ["Hello,", "", "World!"] it "wraps long lines without truncation" $ do wrapTextToLines 2 "Hello, World!" `shouldBe` ["Hello,", "World!"]
word-wrap.cabal view
@@ -1,5 +1,5 @@ name: word-wrap-version: 0.1.1+version: 0.1.2 synopsis: A library for word-wrapping description: A library for wrapping long lines of text. license: BSD3