Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed plugins to use new Network.Gitit prefix.

  • Loading branch information...
commit 3da0cc880bfcc953f28871d75f17a9c8b45ca748 1 parent 2e4d87e
John MacFarlane authored
10 Network/Gitit/Plugins.hs
View
@@ -38,7 +38,7 @@ loadPlugin pluginName =
runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
setSessionDynFlags dflags
- unless ("Gitit.Plugin." `isPrefixOf` pluginName)
+ unless ("Network.Gitit.Plugin." `isPrefixOf` pluginName)
$ do
addTarget =<< guessTarget pluginName Nothing
r <- load LoadAllTargets
@@ -46,13 +46,13 @@ loadPlugin pluginName =
Failed -> error $ "Error loading plugin: " ++ pluginName
Succeeded -> return ()
let modName =
- if "Gitit.Plugin" `isPrefixOf` pluginName
+ if "Network.Gitit.Plugin" `isPrefixOf` pluginName
then pluginName
- else if "Gitit/Plugin/" `isInfixOf` pluginName
- then "Gitit.Plugin." ++ takeBaseName pluginName
+ else if "Network/Gitit/Plugin/" `isInfixOf` pluginName
+ then "Network.Gitit.Plugin." ++ takeBaseName pluginName
else takeBaseName pluginName
pr <- findModule (mkModuleName "Prelude") Nothing
- i <- findModule (mkModuleName "Gitit.Interface") Nothing
+ i <- findModule (mkModuleName "Network.Gitit.Interface") Nothing
m <- findModule (mkModuleName modName) Nothing
setContext [] [m, i, pr]
value <- compileExpr (modName ++ ".plugin :: Plugin")
2  README.markdown
View
@@ -82,7 +82,7 @@ Plugins are small Haskell programs that transform a wiki page after it
has been converted from Markdown or RST. See the example plugins in the
`plugins` directory. To enable a plugin, include the path to the plugin
(or its module name) in the `plugins` field of the configuration file.
-(If the plugin name starts with `Gitit.Plugin.`, gitit will assume that
+(If the plugin name starts with `Network.Gitit.Plugin.`, gitit will assume that
the plugin is an installed module and will not look for a source file.)
The gitit executable will be much larger if plugins support is compiled
2  plugins/CapitalizeEmphasisPlugin.hs
View
@@ -4,7 +4,7 @@ module CapitalizeEmphasisPlugin (plugin) where
-- Not a very useful feature, but useful as an example
-- of how to write a plugin.
-import Gitit.Interface
+import Network.Gitit.Interface
import Data.Char (toUpper)
plugin :: Plugin
2  plugins/DeprofanizerPlugin.hs
View
@@ -3,7 +3,7 @@ module DeprofanizerPlugin (plugin) where
-- This plugin replaces profane words with "XXXXX".
-import Gitit.Interface
+import Network.Gitit.Interface
import Data.Char (toLower)
plugin :: Plugin
2  plugins/DotPlugin.hs
View
@@ -12,7 +12,7 @@ module DotPlugin (plugin) where
-- If no name is specified, a unique name will be generated from a hash
-- of the file contents.
-import Gitit.Interface
+import Network.Gitit.Interface
import System.Process
import System.Exit
-- from the utf8-string package on HackageDB:
2  plugins/ImgTexPlugin.hs
View
@@ -24,7 +24,7 @@ written by Kohei OZAKI <i@smly.org>
-}
-import Gitit.Interface
+import Network.Gitit.Interface
import Text.Pandoc.Shared
import System.Process (system)
import System.Directory
2  plugins/InterwikiPlugin.hs
View
@@ -17,7 +17,7 @@
module InterwikiPlugin (plugin) where
-import Gitit.Interface
+import Network.Gitit.Interface
import qualified Data.Map as M (fromList, lookup, Map)
import Network.URI (escapeURIString, isAllowedInURI, unEscapeString)
2  plugins/PageFormatPlugin.hs
View
@@ -13,7 +13,7 @@ module PageFormatPlugin (plugin) where
-- the page is rendered as Markdown literate Haskell.
-- Otherwise, the default page format is used.
-import Gitit.Interface
+import Network.Gitit.Interface
import Data.Char (toLower)
plugin :: Plugin
2  plugins/ShowUserPlugin.hs
View
@@ -3,7 +3,7 @@ module ShowUserPlugin (plugin) where
-- This plugin replaces $USER$ with the name of the currently logged in
-- user, or the empty string if no one is logged in.
-import Gitit.Interface
+import Network.Gitit.Interface
import Data.Maybe (fromMaybe)
plugin :: Plugin
2  plugins/SignaturePlugin.hs
View
@@ -3,7 +3,7 @@ module SignaturePlugin (plugin) where
-- This plugin replaces $SIG$ with the username and timestamp
-- of the last edit, prior to saving the page in the repository.
-import Gitit.Interface
+import Network.Gitit.Interface
import Data.Maybe (fromMaybe)
import Data.DateTime
import Control.Monad
Please sign in to comment.
Something went wrong with that request. Please try again.