summaryrefslogtreecommitdiff
blob: 1c261b8bff79aed879670113fd1dfc5808ee5835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/Network/Gitit/Types.hs b/Network/Gitit/Types.hs
index a278633..6f2b65f 100644
--- a/Network/Gitit/Types.hs
+++ b/Network/Gitit/Types.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeSynonymInstances, ScopedTypeVariables, FlexibleInstances #-}
+{-# LANGUAGE TypeSynonymInstances, ScopedTypeVariables, FlexibleInstances, CPP #-}
 {-
 Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu>,
 Anton van Straaten <anton@appsolutions.com>
@@ -400,7 +400,11 @@ type Handler = GititServerPart Response
 fromEntities :: String -> String
 fromEntities ('&':xs) =
   case lookupEntity ent of
+#if MIN_VERSION_tagsoup(0,13,0)
+        Just c  -> c ++ fromEntities rest
+#else
         Just c  -> c : fromEntities rest
+#endif
         Nothing -> '&' : fromEntities xs
     where (ent, rest) = case break (\c -> isSpace c || c == ';') xs of
                              (zs,';':ys) -> (zs,ys)