···659659 let
660660 # spago requires an older version of megaparsec, but it appears to work
661661 # fine with newer versions.
662662- spagoWithOverrides = doJailbreak (super.spago.override {
663663- dhall = self.dhall_1_37_1;
664664- });
662662+ spagoWithOverrides = doJailbreak super.spago;
665663666664 # This defines the version of the purescript-docs-search release we are using.
667665 # This is defined in the src/Spago/Prelude.hs file in the spago source.
···11-commit a03d3b043458f45d29ba32068a77c0d3b8a4223f
22-Author: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>
33-Date: Fri Apr 2 15:14:02 2021 +0200
44-55- Allow compilation with pandoc 2.12 and 2.13
66-77- pandoc 2.13 introduced the following breakages for gitit:
88-99- * UTF8.readFile now returns a Text which is actually ideal for gitit.
1010- If pandoc is new enough we just make readFileUTF8 an alias for
1111- UTF8.readFile.
1212-1313- * Text.Pandoc.Shared no longer exports substitute. In order to be
1414- conservative I've chosen to just copy the substitute function from
1515- pandoc 2.11.4. I need this patch kind of urgently so I didn't want to
1616- make any changes or refactors independently from upstream if
1717- avoidable. However, I'd be happy to rebase this PR branch to adopt a
1818- different solution to just copying the function.
1919-2020-diff --git a/src/Network/Gitit/Authentication.hs b/src/Network/Gitit/Authentication.hs
2121-index 4c240e7..c0f92fd 100644
2222---- a/src/Network/Gitit/Authentication.hs
2323-+++ b/src/Network/Gitit/Authentication.hs
2424-@@ -44,7 +44,7 @@ import System.Exit
2525- import System.Log.Logger (logM, Priority(..))
2626- import Data.Char (isAlphaNum, isAlpha)
2727- import qualified Data.Map as M
2828--import Text.Pandoc.Shared (substitute)
2929-+import Data.List (stripPrefix)
3030- import Data.Maybe (isJust, fromJust, isNothing, fromMaybe)
3131- import Network.URL (exportURL, add_param, importURL)
3232- import Network.BSD (getHostName)
3333-@@ -54,6 +54,16 @@ import Codec.Binary.UTF8.String (encodeString)
3434- import Data.ByteString.UTF8 (toString)
3535- import Network.Gitit.Rpxnow as R
3636-3737-+-- | Replace each occurrence of one sublist in a list with another.
3838-+-- Vendored in from pandoc 2.11.4 as 2.12 removed this function.
3939-+substitute :: (Eq a) => [a] -> [a] -> [a] -> [a]
4040-+substitute _ _ [] = []
4141-+substitute [] _ xs = xs
4242-+substitute target replacement lst@(x:xs) =
4343-+ case stripPrefix target lst of
4444-+ Just lst' -> replacement ++ substitute target replacement lst'
4545-+ Nothing -> x : substitute target replacement xs
4646-+
4747- data ValidationType = Register
4848- | ResetPassword
4949- deriving (Show,Read)
5050-diff --git a/src/Network/Gitit/Util.hs b/src/Network/Gitit/Util.hs
5151-index c5e9fe5..067130a 100644
5252---- a/src/Network/Gitit/Util.hs
5353-+++ b/src/Network/Gitit/Util.hs
5454-@@ -45,7 +45,11 @@ import Network.URL (encString)
5555-5656- -- | Read file as UTF-8 string. Encode filename as UTF-8.
5757- readFileUTF8 :: FilePath -> IO Text
5858-+#if MIN_VERSION_pandoc(2,12,0)
5959-+readFileUTF8 = UTF8.readFile
6060-+#else
6161- readFileUTF8 = fmap T.pack . UTF8.readFile
6262-+#endif
6363-6464- -- | Perform a function a directory and return to working directory.
6565- inDir :: FilePath -> IO a -> IO a