diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-10-03 22:41:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-10-03 22:41:24 -0700 |
commit | 7caaa3d5d63c50466a95504ead9b2226297e4912 (patch) | |
tree | b1d440c733d04d3a889ab9475b07ec82b6966c71 /src/Text/Pandoc/Readers/Haddock.hs | |
parent | 20c87962e35c4059dcc01729e30a219527f5e041 (diff) | |
download | pandoc-7caaa3d5d63c50466a95504ead9b2226297e4912.tar.gz |
Minor ghc 8.8 fixups.
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Haddock.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs index 072bab350..0a048b6e6 100644 --- a/src/Text/Pandoc/Readers/Haddock.hs +++ b/src/Text/Pandoc/Readers/Haddock.hs @@ -117,7 +117,10 @@ docHToInlines isCode d' = $ map B.code $ splitBy (=='\n') s | otherwise -> B.text s DocParagraph _ -> mempty - DocIdentifier (_,s,_) -> B.codeWith ("",["haskell","identifier"],[]) s + DocIdentifier ident -> + case toRegular (DocIdentifier ident) of + DocIdentifier s -> B.codeWith ("",["haskell","identifier"],[]) s + _ -> mempty DocIdentifierUnchecked s -> B.codeWith ("",["haskell","identifier"],[]) s DocModule s -> B.codeWith ("",["haskell","module"],[]) s DocWarning _ -> mempty -- TODO @@ -133,7 +136,8 @@ docHToInlines isCode d' = DocDefList _ -> mempty DocCodeBlock _ -> mempty DocHyperlink h -> B.link (hyperlinkUrl h) (hyperlinkUrl h) - (maybe (B.text $ hyperlinkUrl h) B.text $ hyperlinkLabel h) + (maybe (B.text $ hyperlinkUrl h) (docHToInlines isCode) + (hyperlinkLabel h)) DocPic p -> B.image (pictureUri p) (fromMaybe (pictureUri p) $ pictureTitle p) (maybe mempty B.text $ pictureTitle p) DocAName s -> B.spanWith (s,["anchor"],[]) mempty |