aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Haddock.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-16 23:18:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-16 23:18:42 -0700
commitfad8d0d67ff4736e1af554d2bfcf1688aa28c8ec (patch)
treeee80498d580f85df696d29f502c956dc3cded36b /src/Text/Pandoc/Readers/Haddock.hs
parentbe12ae3bca4f1c2d712e412b11a14b6473c7ab10 (diff)
downloadpandoc-fad8d0d67ff4736e1af554d2bfcf1688aa28c8ec.tar.gz
Allow earlier versions of haddock-library, use CPP.
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock.hs')
-rw-r--r--src/Text/Pandoc/Readers/Haddock.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs
index b593c4cc8..d3531dd03 100644
--- a/src/Text/Pandoc/Readers/Haddock.hs
+++ b/src/Text/Pandoc/Readers/Haddock.hs
@@ -85,6 +85,7 @@ docHToBlocks d' =
DocProperty s -> B.codeBlockWith ("",["property","haskell"],[]) (trim s)
DocExamples es -> mconcat $ map (\e ->
makeExample ">>>" (exampleExpression e) (exampleResult e)) es
+#if MIN_VERSION_haddock_library(1,5,0)
DocTable H.Table{ tableHeaderRows = headerRows
, tableBodyRows = bodyRows
}
@@ -97,6 +98,7 @@ docHToBlocks d' =
colspecs = replicate (maximum (map length body))
(AlignDefault, 0.0)
in B.table mempty colspecs header body
+#endif
where inlineFallback = B.plain $ docHToInlines False d'
consolidatePlains = B.fromList . consolidatePlains' . B.toList