diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-10-11 15:08:33 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-10-11 15:08:33 -0700 |
commit | 906e6016bb33aa1d5a20edc45c91836289caf52f (patch) | |
tree | df04d3eb3e146375344a366d17798da87580402e /src | |
parent | 5d17020a20543a5c4864ecb81b0caa5b64c280a9 (diff) | |
download | pandoc-906e6016bb33aa1d5a20edc45c91836289caf52f.tar.gz |
T.P.Writers.Shared: remove 'breakable'...
which was introduced in the cherry-pick'd commit that
added splitSentences, but isn't needed here.
(It is for the nospace branch.)
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Shared.hs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs index 34c4ebfba..6b8be3c8b 100644 --- a/src/Text/Pandoc/Writers/Shared.hs +++ b/src/Text/Pandoc/Writers/Shared.hs @@ -36,7 +36,6 @@ module Text.Pandoc.Writers.Shared ( , toTableOfContents , endsWithPlain , toLegacyTable - , breakable , splitSentences ) where @@ -523,23 +522,6 @@ toLegacyTable (Caption _ cbody) specs thead tbodies tfoot getComponents (Cell _ _ (RowSpan h) (ColSpan w) body) = (h, w, body) --- | Create a breakable 'Doc' from a text. Only regular spaces --- are break points (not tabs or nonbreaking spaces). -breakable :: Text -> Doc Text -breakable t - | T.any (== ' ') t = mconcat $ foldr go mempty (T.split (==' ') t) - | otherwise = Text (realLength t) t - where - go "" xs = - case xs of - BreakingSpace : _ -> xs - _ -> BreakingSpace : xs - go t' xs = Text (realLength t') t' : - case xs of - [] -> xs - BreakingSpace : _ -> xs - _ -> BreakingSpace : xs - splitSentences :: Doc Text -> Doc Text splitSentences = go . toList where |