aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorMichael Thompson <what_is_it_to_do_anything@yahoo.com>2012-03-07 12:27:46 -0500
committerMichael Thompson <what_is_it_to_do_anything@yahoo.com>2012-03-07 12:27:46 -0500
commit2d1703e8a00349a1f76961a78688cb52f4d4e903 (patch)
treed54ed42a086d7a534ad4604627b5cd5141360f8e /src/Text
parent30cafd913a03fce20c55d065f1cd0cadec55375f (diff)
downloadpandoc-2d1703e8a00349a1f76961a78688cb52f4d4e903.tar.gz
Fix initial `Str "."` after `LineBreak` as well?
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Man.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index d3735efa7..84d43b6bc 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -124,6 +124,7 @@ breakSentence [] = ([],[])
breakSentence xs =
let isSentenceEndInline (Str ".") = True
isSentenceEndInline (Str "?") = True
+ isSentenceEndInline (LineBreak) = True
isSentenceEndInline _ = False
(as, bs) = break isSentenceEndInline xs
in case bs of
@@ -131,6 +132,7 @@ breakSentence xs =
[c] -> (as ++ [c], [])
(c:Space:cs) -> (as ++ [c], cs)
(Str ".":Str ")":cs) -> (as ++ [Str ".", Str ")"], cs)
+ (LineBreak:Str ".":cs) -> (as ++[LineBreak], Str ".":cs)
(c:cs) -> (as ++ [c] ++ ds, es)
where (ds, es) = breakSentence cs