aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-10-11 15:08:33 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-11 15:08:33 -0700
commit906e6016bb33aa1d5a20edc45c91836289caf52f (patch)
treedf04d3eb3e146375344a366d17798da87580402e
parent5d17020a20543a5c4864ecb81b0caa5b64c280a9 (diff)
downloadpandoc-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.)
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs18
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