)
where
-import Rakka.Wiki.Interpreter
import Rakka.Wiki
+import Rakka.Wiki.Interpreter
+import Rakka.Wiki.Interpreter.Base.Image
baseInterpreters :: [Interpreter]
-baseInterpreters = [ lineBreakInterp ]
+baseInterpreters = [ lineBreakInterp
+ , spanInterp
+ , divInterp
+ , imageInterp
+ , imgFrameInterp
+ ]
lineBreakInterp :: Interpreter
-lineBreakInterp = pureInlineInterp "br" interpret
- where
- interpret (InlineCommand _ attrs _) _ = LineBreak attrs
+lineBreakInterp = InlineCommandInterpreter {
+ iciName = "br"
+ , iciInterpret
+ = \ _ (InlineCommand _ attrs _) -> return $ LineBreak attrs
+ }
+
+
+spanInterp :: Interpreter
+spanInterp = InlineCommandInterpreter {
+ iciName = "span"
+ , iciInterpret
+ = \ _ (InlineCommand _ attrs contents) -> return $ Span attrs contents
+ }
+
+
+divInterp :: Interpreter
+divInterp = BlockCommandInterpreter {
+ bciName = "div"
+ , bciInterpret
+ = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
+ }