diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-04 20:26:52 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-04 20:26:52 -0800 |
commit | e2d86dfe286085cc33b513b17444e846fae0ce30 (patch) | |
tree | 533008ff05af1546854623c9c6d145c901dbc441 /src/Text/Pandoc/Writers/Markdown.hs | |
parent | 4866c905b0dbca5338c04b9cdcad20bc5846c710 (diff) | |
parent | 9c68017786932e355461168d3ca0593e36d8d7f8 (diff) |
Merge pull request #1856 from markwright/master
Allow compilation with ghc 7.10.1 RC1 and haddock-library 1.2
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index f06f1d6cc..d71f0daf8 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -323,9 +323,9 @@ blockToMarkdown opts (Plain inlines) = do then Just $ writerColumns opts else Nothing let rendered = render colwidth contents - let escapeDelimiter (x:xs) | x `elem` ".()" = '\\':x:xs - | otherwise = x : escapeDelimiter xs - escapeDelimiter [] = [] + let escapeDelimiter (x:xs) | x `elem` (".()" :: String) = '\\':x:xs + | otherwise = x : escapeDelimiter xs + escapeDelimiter [] = [] let contents' = if isEnabled Ext_all_symbols_escapable opts && not (stPlain st) && beginsWithOrderedListMarker rendered then text $ escapeDelimiter rendered @@ -681,7 +681,7 @@ inlineListToMarkdown opts lst = mapM (inlineToMarkdown opts) (avoidBadWraps lst) >>= return . cat where avoidBadWraps [] = [] avoidBadWraps (Space:Str (c:cs):xs) - | c `elem` "-*+>" = Str (' ':c:cs) : avoidBadWraps xs + | c `elem` ("-*+>" :: String) = Str (' ':c:cs) : avoidBadWraps xs avoidBadWraps (x:xs) = x : avoidBadWraps xs escapeSpaces :: Inline -> Inline @@ -821,8 +821,8 @@ inlineToMarkdown opts (Cite (c:cs) lst) sdoc <- inlineListToMarkdown opts sinlines let k' = text (modekey m ++ "@" ++ k) r = case sinlines of - Str (y:_):_ | y `elem` ",;]@" -> k' <> sdoc - _ -> k' <+> sdoc + Str (y:_):_ | y `elem` (",;]@" :: String) -> k' <> sdoc + _ -> k' <+> sdoc return $ pdoc <+> r modekey SuppressAuthor = "-" modekey _ = "" |