]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Base.hs
Farewell the dream of plug-in system... It's way too hard to implement nicely. Many...
[Rakka.git] / Rakka / Wiki / Interpreter / Base.hs
index 1475f461478c4d8694dd680216b449431a0cb3a8..0070a837c376df6838bd2796d894cdaef62ccfa6 100644 (file)
@@ -1,20 +1,18 @@
 module Rakka.Wiki.Interpreter.Base
-    ( baseInterpreters
+    ( interpreters
     )
     where
 
 import           Rakka.Wiki
 import           Rakka.Wiki.Interpreter
-import           Rakka.Wiki.Interpreter.Base.Image
 
 
-baseInterpreters :: [Interpreter]
-baseInterpreters = [ lineBreakInterp
-                   , spanInterp
-                   , divInterp
-                   , imageInterp
-                   , imgFrameInterp
-                   ]
+interpreters :: [Interpreter]
+interpreters = [ lineBreakInterp
+               , spanInterp
+               , divInterp
+               , pageNameInterp
+               ]
 
 
 lineBreakInterp :: Interpreter
@@ -39,3 +37,11 @@ divInterp = BlockCommandInterpreter {
             , bciInterpret
                 = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
             }
+
+
+pageNameInterp :: Interpreter
+pageNameInterp = InlineCommandInterpreter {
+                   iciName      = "pageName"
+                 , iciInterpret
+                     = \ ctx _ -> return $ Text (ctxPageName ctx)
+                 }