packages feed

table-layout 0.9.0.1 → 0.9.0.2

raw patch · 4 files changed

+13/−4 lines, 4 files

Files

CHANGELOG.md view
@@ -2,6 +2,13 @@  ## [Unreleased] +## [0.9.0.2] - 2020-12-20++### Fixed++- Fix error in `fitWords` that was reversing the word order.  This also affects+  `justify` and `justifyWords`. (#14)+ ## [0.9.0.1] - 2020-06-14  ### Added
src/Text/Layout/Table/Justify.hs view
@@ -83,7 +83,7 @@  -- | Completes the current line. finishLine :: FitState -> Line-finishLine FitState {..} = Line fitStateLineLen fitStateWordCount $ reverse fitStateWords+finishLine FitState {..} = Line fitStateLineLen fitStateWordCount fitStateWords  finishFitState :: FitState -> [Line] finishFitState s@FitState {..} = finishLines fitStateLines
table-layout.cabal view
@@ -6,7 +6,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.9.0.1+version:             0.9.0.2  synopsis:            Format tabular data as grid or table. 
test-suite/TestSpec.hs view
@@ -153,8 +153,10 @@         prop "alignFixed length" $ forAll hposG $ \p s (Positive (Small n)) ->             length (alignFixed' p n (s :: String) :: String) `shouldBe` n -    describe "text justification" $-        it "justify" $ justify 3 ["not", "now"] `shouldBe` ["not", "now"]+    describe "text justification" $ do+        describe "justify" $ do+            it "break lines" $ justify 3 ["not", "now"] `shouldBe` ["not", "now"]+            it "words in right order" $ justify 10 ["not", "now"] `shouldBe` ["not now"]   where     customCM = doubleCutMark "<.." "..>"     unevenCM = doubleCutMark "<" "-->"