aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src
diff options
context:
space:
mode:
authoralexbiehl <alex.biehl@gmail.com>2017-08-27 18:50:16 +0200
committeralexbiehl <alex.biehl@gmail.com>2017-08-27 18:50:16 +0200
commit705dc006595db165e1cb244485cf47bcae02e2d0 (patch)
treee65650d436af87bfd84b4ae65668d14490b98476 /haddock-api/src
parent3a09040a16fb574254d4dc095047ed7b0b7beb19 (diff)
Content search for haddock html doc
Diffstat (limited to 'haddock-api/src')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs6
-rw-r--r--haddock-api/src/Haddock/Utils.hs10
2 files changed, 15 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 78bd0262..e1bbee7b 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -108,6 +108,9 @@ copyHtmlBits odir libdir themes = do
copyLibFile f = copyFile (joinPath [libhtmldir, f]) (joinPath [odir, f])
mapM_ copyCssFile (cssFiles themes)
copyLibFile jsFile
+ copyLibFile jsFuseFile
+ copyLibFile jsIndexFile
+ copyLibFile jsPreactFile
return ()
@@ -118,6 +121,9 @@ headHtml docTitle themes mathjax_url =
thetitle << docTitle,
styleSheet themes,
script ! [src jsFile, thetype "text/javascript"] << noHtml,
+ script ! [src jsPreactFile, thetype "text/javascript"] << noHtml,
+ script ! [src jsFuseFile, thetype "text/javascript"] << noHtml,
+ script ! [src jsIndexFile, thetype "text/javascript"] << noHtml,
script ! [src mjUrl, thetype "text/javascript"] << noHtml,
script ! [thetype "text/javascript"]
-- NB: Within XHTML, the content of script tags needs to be
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs
index 200cd00a..53d69418 100644
--- a/haddock-api/src/Haddock/Utils.hs
+++ b/haddock-api/src/Haddock/Utils.hs
@@ -23,7 +23,7 @@ module Haddock.Utils (
contentsHtmlFile, indexHtmlFile, indexJsonFile,
moduleIndexFrameName, mainFrameName, synopsisFrameName,
subIndexHtmlFile,
- jsFile,
+ jsFile, jsFuseFile, jsIndexFile, jsPreactFile,
-- * Anchor and URL utilities
moduleNameUrl, moduleNameUrl', moduleUrl,
@@ -328,6 +328,14 @@ makeAnchorId (f:r) = escape isAlpha f ++ concatMap (escape isLegal) r
jsFile :: String
jsFile = "haddock-util.js"
+jsIndexFile :: String
+jsIndexFile = "index.js"
+
+jsFuseFile :: String
+jsFuseFile = "fuse.js"
+
+jsPreactFile :: String
+jsPreactFile = "preact.js"
-------------------------------------------------------------------------------
-- * Misc.