aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-12-25 11:03:11 +0100
committerBen Gamari <ben@smart-cactus.org>2015-12-25 11:03:11 +0100
commit0104ef892820383845b3dce44c46899fec2f04f0 (patch)
tree81eba131303296aeb5ef5c880504cab0932dcab2 /haddock-api/src/Haddock/Backends/Xhtml
parent2d4680f12f8c9cd647049eb1e3e56531bd44e880 (diff)
parent3f50b955324bd4b42f88a421f0203bc46a3ccf64 (diff)
Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
index 3fe74a82..e36f9528 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -33,6 +33,7 @@ import Data.Maybe (fromMaybe)
import GHC
import Name
+
parHtmlMarkup :: Qualification -> Bool
-> (Bool -> a -> Html) -> DocMarkup a Html
parHtmlMarkup qual insertAnchors ppId = Markup {
@@ -67,6 +68,8 @@ parHtmlMarkup qual insertAnchors ppId = Markup {
then namedAnchor aname << ""
else noHtml,
markupPic = \(Picture uri t) -> image ! ([src uri] ++ fromMaybe [] (return . title <$> t)),
+ markupMathInline = \mathjax -> toHtml ("\\(" ++ mathjax ++ "\\)"),
+ markupMathDisplay = \mathjax -> toHtml ("\\[" ++ mathjax ++ "\\]"),
markupProperty = pre . toHtml,
markupExample = examplesToHtml,
markupHeader = \(Header l t) -> makeHeader l t