aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-07-15 12:04:00 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-07-15 12:04:00 -0700
commitd7396e73b4ca72d607836cd285be845a85ca6a9b (patch)
tree87525c96f1758893fe7d6c1f91a5b356d18efff1 /src/Text/Pandoc/Readers
parent17defd5004cec576a1b481b76c59545067e68663 (diff)
downloadpandoc-d7396e73b4ca72d607836cd285be845a85ca6a9b.tar.gz
Don't require haddock-library 1.4.
Instead use CPP to work around version differences.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Haddock.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock.hs b/src/Text/Pandoc/Readers/Haddock.hs
index f0521e6f7..99deac3c2 100644
--- a/src/Text/Pandoc/Readers/Haddock.hs
+++ b/src/Text/Pandoc/Readers/Haddock.hs
@@ -60,8 +60,10 @@ docHToBlocks d' =
DocEmphasis _ -> inlineFallback
DocMonospaced _ -> inlineFallback
DocBold _ -> inlineFallback
+#if MIN_VERSION_haddock_library(1,4,0)
DocMathInline _ -> inlineFallback
DocMathDisplay _ -> inlineFallback
+#endif
DocHeader h -> B.header (headerLevel h)
(docHToInlines False $ headerTitle h)
DocUnorderedList items -> B.bulletList (map docHToBlocks items)
@@ -109,8 +111,10 @@ docHToInlines isCode d' =
DocMonospaced (DocString s) -> B.code s
DocMonospaced d -> docHToInlines True d
DocBold d -> B.strong (docHToInlines isCode d)
+#if MIN_VERSION_haddock_library(1,4,0)
DocMathInline s -> B.math s
DocMathDisplay s -> B.displayMath s
+#endif
DocHeader _ -> mempty
DocUnorderedList _ -> mempty
DocOrderedList _ -> mempty