1 module Rakka.Wiki.Interpreter.Base
7 import Rakka.Wiki.Interpreter
8 import Rakka.Wiki.Interpreter.Base.Image
9 import Rakka.Wiki.Interpreter.Base.Outline
12 baseInterpreters :: [Interpreter]
13 baseInterpreters = [ lineBreakInterp
24 lineBreakInterp :: Interpreter
25 lineBreakInterp = InlineCommandInterpreter {
28 = \ _ (InlineCommand _ attrs _) -> return $ LineBreak attrs
32 spanInterp :: Interpreter
33 spanInterp = InlineCommandInterpreter {
36 = \ _ (InlineCommand _ attrs contents) -> return $ Span attrs contents
40 divInterp :: Interpreter
41 divInterp = BlockCommandInterpreter {
44 = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
48 pageNameInterp :: Interpreter
49 pageNameInterp = InlineCommandInterpreter {
52 = \ ctx _ -> return $ Text (ctxPageName ctx)