diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-03-19 11:48:05 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-03-19 11:48:05 -0700 |
commit | b983adf0d0cbc98d2da1e2751f46ae1f93352be6 (patch) | |
tree | 859e222001a713c96591c9bbd17d6194e15c7730 /src/Text/Pandoc | |
parent | 8b8a613cd40ab61beb79beaf96d72be61890cef4 (diff) | |
download | pandoc-b983adf0d0cbc98d2da1e2751f46ae1f93352be6.tar.gz |
Markdown writer: fixes for GHC 7.10.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index ebf7e20e2..dee4d56a4 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -724,9 +724,9 @@ avoidBadWrapsInList [] = [] avoidBadWrapsInList (Space:Str ('>':cs):xs) = Str (' ':'>':cs) : avoidBadWrapsInList xs avoidBadWrapsInList (Space:Str [c]:[]) - | c `elem` "-*+" = Str [' ', c] : [] + | c `elem` ['-','*','+'] = Str [' ', c] : [] avoidBadWrapsInList (Space:Str [c]:Space:xs) - | c `elem` "-*+" = Str [' ', c] : Space : avoidBadWrapsInList xs + | c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs avoidBadWrapsInList (Space:Str cs:Space:xs) | isOrderedListMarker cs = Str (' ':cs) : Space : avoidBadWrapsInList xs avoidBadWrapsInList (Space:Str cs:[]) @@ -734,7 +734,7 @@ avoidBadWrapsInList (Space:Str cs:[]) avoidBadWrapsInList (x:xs) = x : avoidBadWrapsInList xs isOrderedListMarker :: String -> Bool -isOrderedListMarker xs = (last xs `elem` ".)") && +isOrderedListMarker xs = (last xs `elem` ['.',')']) && isRight (runParserT (anyOrderedListMarker >> eof) defaultParserState "" xs) |