mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-20 14:35:44 +00:00
ghc 7.10.1 RC1 requires specifying the type of String literals https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
This commit is contained in:
@@ -105,7 +105,7 @@ keyToRST :: ([Inline], (String, String))
|
||||
-> State WriterState Doc
|
||||
keyToRST (label, (src, _)) = do
|
||||
label' <- inlineListToRST label
|
||||
let label'' = if ':' `elem` (render Nothing label')
|
||||
let label'' = if ':' `elem` ((render Nothing label') :: String)
|
||||
then char '`' <> label' <> char '`'
|
||||
else label'
|
||||
return $ nowrap $ ".. _" <> label'' <> ": " <> text src
|
||||
@@ -333,12 +333,12 @@ inlineListToRST lst =
|
||||
okAfterComplex :: Inline -> Bool
|
||||
okAfterComplex Space = True
|
||||
okAfterComplex LineBreak = True
|
||||
okAfterComplex (Str (c:_)) = isSpace c || c `elem` "-.,:;!?\\/'\")]}>–—"
|
||||
okAfterComplex (Str (c:_)) = isSpace c || c `elem` ("-.,:;!?\\/'\")]}>–—" :: String)
|
||||
okAfterComplex _ = False
|
||||
okBeforeComplex :: Inline -> Bool
|
||||
okBeforeComplex Space = True
|
||||
okBeforeComplex LineBreak = True
|
||||
okBeforeComplex (Str (c:_)) = isSpace c || c `elem` "-:/'\"<([{–—"
|
||||
okBeforeComplex (Str (c:_)) = isSpace c || c `elem` ("-:/'\"<([{–—" :: String)
|
||||
okBeforeComplex _ = False
|
||||
isComplex :: Inline -> Bool
|
||||
isComplex (Emph _) = True
|
||||
|
||||
Reference in New Issue
Block a user