packages feed

WEditorHyphen 0.1.0.3 → 0.1.0.4

raw patch · 3 files changed

+9/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

WEditorHyphen.cabal view
@@ -1,5 +1,5 @@ name:                WEditorHyphen-version:             0.1.0.3+version:             0.1.0.4 synopsis:            Language-specific hyphenation policies for WEditor.  description:
WEditorHyphen/LangHyphen.hs view
@@ -75,7 +75,7 @@           -- Add a break if adding a segment would exceed the remaining space.           | (n+k > t-(length (hyphenChar l)) && not (null ks)) || n+k > t = n:(combine w k ks)           -- Append the next segment to the current segment.-          | otherwise = combine w (n+k) ks+          | otherwise = combine t (n+k) ks   isWordChar (LangHyphen l _) = wordChars l   isWhitespace (LangHyphen l _) = whitespaceChars l   appendHyphen (LangHyphen l _) = (++ hyphenChar l)
test/TestLangHyphen.hs view
@@ -89,12 +89,17 @@        (setLineWidth (breakWords (langHyphen English_US)) 8)        "something's"        [hyphenLine "some",-        endLine"thing's"]),+        endLine "thing's"]),     ("langHyphen English_US trailing apostrophe not left hanging", checkLineBreak        (setLineWidth (breakWords (langHyphen English_US)) 8)        "    aren't"        [innerLine "    ",-        endLine "aren't"])+        endLine "aren't"]),+    ("langHyphen English_US multiple segments on first line", checkLineBreak+       (setLineWidth (breakWords (langHyphen English_US)) 12)+       "the existentialism"+       [hyphenLine "the existen",+        endLine "tialism"])   ]  checkLineBreak b x ys = do