1 module Rakka.Wiki.Interpreter.Base
7 import Rakka.Wiki.Interpreter
8 import Rakka.Wiki.Interpreter.Base.Image
11 baseInterpreters :: [Interpreter]
12 baseInterpreters = [ lineBreakInterp
22 lineBreakInterp :: Interpreter
23 lineBreakInterp = InlineCommandInterpreter {
26 = \ _ (InlineCommand _ attrs _) -> return $ LineBreak attrs
30 spanInterp :: Interpreter
31 spanInterp = InlineCommandInterpreter {
34 = \ _ (InlineCommand _ attrs contents) -> return $ Span attrs contents
38 divInterp :: Interpreter
39 divInterp = BlockCommandInterpreter {
42 = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
46 pageNameInterp :: Interpreter
47 pageNameInterp = InlineCommandInterpreter {
50 = \ ctx _ -> return $ Text (ctxPageName ctx)