Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.498 kb
-- DeprofanizerPlugin.hs
module DeprofanizerPlugin (plugin) where
-- This plugin replaces profane words with "XXXXX".
import Network.Gitit.Interface
import Data.Char (toLower)
plugin :: Plugin
plugin = mkPageTransform deprofanize
deprofanize :: Inline -> Inline
deprofanize (Str x) | isBadWord x = Str "XXXXX"
deprofanize x = x
isBadWord :: String -> Bool
isBadWord x = (map toLower x) `elem` ["darn", "blasted", "stinker"]
-- there are more, but this is a family program
Jump to Line
Something went wrong with that request. Please try again.