WEditorHyphen 0.1.0.1 → 0.1.0.2
raw patch · 3 files changed
+14/−3 lines, 3 filesdep ~WEditorPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: WEditor
API changes (from Hackage documentation)
Files
- WEditorHyphen.cabal +2/−2
- WEditorHyphen/LangHyphen.hs +4/−0
- test/TestLangHyphen.hs +8/−1
WEditorHyphen.cabal view
@@ -1,5 +1,5 @@ name: WEditorHyphen-version: 0.1.0.1+version: 0.1.0.2 synopsis: Language-specific hyphenation policies for WEditor. description:@@ -30,7 +30,7 @@ build-depends: base >= 4.0 && < 4.14, hyphenation >= 0.3 && < 0.9,- WEditor >= 0.2 && < 0.3+ WEditor >= 0.2.1 && < 0.3 default-language: Haskell2010
WEditorHyphen/LangHyphen.hs view
@@ -28,6 +28,7 @@ ) where import Data.Char+import Data.List import Text.Hyphenation import WEditor.LineWrap @@ -78,6 +79,9 @@ isWordChar (LangHyphen l _) = wordChars l isWhitespace (LangHyphen l _) = whitespaceChars l appendHyphen (LangHyphen l _) = (++ hyphenChar l)+ endsWithHyphen (LangHyphen l _) cs+ | null cs || null (hyphenChar l) = False+ | otherwise = hyphenChar l `isSuffixOf` cs minWidth :: Language -> Int minWidth _ = 8
test/TestLangHyphen.hs view
@@ -77,7 +77,14 @@ (setLineWidth (breakWords (langHyphen English_US)) 8) " \"The.\"" [innerLine " ",- endLine "\"The.\""])+ endLine "\"The.\""]),+ ("langHyphen English_US split at existing hyphen", checkLineBreak+ (setLineWidth (breakWords (langHyphen English_US)) 8)+ "pseudo-somethingness"+ [innerLine "pseudo-",+ hyphenLine "some",+ hyphenLine "thing",+ endLine "ness"]) ] checkLineBreak b x ys = do