git.iko.soy/typeable/pandoc
on master help sign in
Markdown writer: fixes for GHC 7.10.
commitb983adf0d0cbc98d2da1e2751f46ae1f93352be6 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 19 Mar 2015, 11:48 (12 years ago) parent8b8a613
1 file changed+3−3
src/Text/Pandoc/Writers/Markdown.hs+3−3
src/Text/Pandoc/Writers/Markdown.hs+3−3
@@ -724,9 +724,9 @@ avoidBadWrapsInList [] = []
724724avoidBadWrapsInList (Space:Str ('>':cs):xs) =
725725 Str (' ':'>':cs) : avoidBadWrapsInList xs
726726avoidBadWrapsInList (Space:Str [c]:[])
727− | c `elem` "-*+" = Str [' ', c] : []
727+ | c `elem` ['-','*','+'] = Str [' ', c] : []
728728avoidBadWrapsInList (Space:Str [c]:Space:xs)
729− | c `elem` "-*+" = Str [' ', c] : Space : avoidBadWrapsInList xs
729+ | c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs
730730avoidBadWrapsInList (Space:Str cs:Space:xs)
731731 | isOrderedListMarker cs = Str (' ':cs) : Space : avoidBadWrapsInList xs
732732avoidBadWrapsInList (Space:Str cs:[])
@@ -734,7 +734,7 @@ avoidBadWrapsInList (Space:Str cs:[])
734734avoidBadWrapsInList (x:xs) = x : avoidBadWrapsInList xs
735735
736736isOrderedListMarker :: String -> Bool
737−isOrderedListMarker xs = (last xs `elem` ".)") &&
737+isOrderedListMarker xs = (last xs `elem` ['.',')']) &&
738738 isRight (runParserT (anyOrderedListMarker >> eof)
739739 defaultParserState "" xs)
740740