@@ -44,11 +44,7 @@ readHaddockEither :: ReaderOptions -- ^ Reader options
4444 -> String -- ^ String to parse
4545 -> Either PandocError Pandoc
4646readHaddockEither _opts =
47−#if MIN_VERSION_haddock_library(1,2,0)
48− Right . B.doc . docHToBlocks . _doc . parseParas
49−#else
50− Right . B.doc . docHToBlocks . parseParas
51−#endif
47+ Right . B.doc . docHToBlocks . _doc . parseParas Nothing
5248
5349docHToBlocks :: DocH String Identifier -> Blocks
5450docHToBlocks d' =
@@ -68,10 +64,8 @@ docHToBlocks d' =
6864 DocEmphasis _ -> inlineFallback
6965 DocMonospaced _ -> inlineFallback
7066 DocBold _ -> inlineFallback
71−#if MIN_VERSION_haddock_library(1,4,0)
7267 DocMathInline _ -> inlineFallback
7368 DocMathDisplay _ -> inlineFallback
74−#endif
7569 DocHeader h -> B.header (headerLevel h)
7670 (docHToInlines False $ headerTitle h)
7771 DocUnorderedList items -> B.bulletList (map docHToBlocks items)
@@ -87,7 +81,6 @@ docHToBlocks d' =
8781 DocProperty s -> B.codeBlockWith ("",["property","haskell"],[]) (trim s)
8882 DocExamples es -> mconcat $ map (\e ->
8983 makeExample ">>>" (exampleExpression e) (exampleResult e)) es
90−#if MIN_VERSION_haddock_library(1,5,0)
9184 DocTable H.Table{ tableHeaderRows = headerRows
9285 , tableBodyRows = bodyRows
9386 }
@@ -100,7 +93,6 @@ docHToBlocks d' =
10093 colspecs = replicate (maximum (map length body))
10194 (AlignDefault, 0.0)
10295 in B.table mempty colspecs header body
103−#endif
10496
10597 where inlineFallback = B.plain $ docHToInlines False d'
10698 consolidatePlains = B.fromList . consolidatePlains' . B.toList
@@ -133,10 +125,8 @@ docHToInlines isCode d' =
133125 DocMonospaced (DocString s) -> B.code s
134126 DocMonospaced d -> docHToInlines True d
135127 DocBold d -> B.strong (docHToInlines isCode d)
136−#if MIN_VERSION_haddock_library(1,4,0)
137128 DocMathInline s -> B.math s
138129 DocMathDisplay s -> B.displayMath s
139−#endif
140130 DocHeader _ -> mempty
141131 DocUnorderedList _ -> mempty
142132 DocOrderedList _ -> mempty
@@ -149,9 +139,7 @@ docHToInlines isCode d' =
149139 DocAName s -> B.spanWith (s,["anchor"],[]) mempty
150140 DocProperty _ -> mempty
151141 DocExamples _ -> mempty
152−#if MIN_VERSION_haddock_library(1,5,0)
153142 DocTable _ -> mempty
154−#endif
155143
156144-- | Create an 'Example', stripping superfluous characters as appropriate
157145makeExample :: String -> String -> [String] -> Blocks