More improvements to breakable.

This commit is contained in:
John MacFarlane
2021-10-02 12:21:41 -07:00
parent 3d3ab57e20
commit 33a792ff39
3 changed files with 5 additions and 1 deletions
+5 -1
View File
@@ -548,8 +548,12 @@ breakable t
| T.any (== ' ') t = mconcat $ foldr go mempty (T.split (==' ') t)
| otherwise = Text (realLength t) t
where
go "" xs = BreakingSpace : xs
go "" xs =
case xs of
BreakingSpace : _ -> xs
_ -> BreakingSpace : xs
go t' xs = Text (realLength t') t' :
case xs of
[] -> xs
BreakingSpace : _ -> xs
_ -> BreakingSpace : xs
Binary file not shown.
Binary file not shown.