mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-01 05:33:41 +08:00
More improvements to breakable.
This commit is contained in:
@@ -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.
Reference in New Issue
Block a user