1 module Rakka.Wiki.Interpreter.Base
7 import Rakka.Wiki.Interpreter
10 interpreters :: [Interpreter]
11 interpreters = [ lineBreakInterp
18 lineBreakInterp :: Interpreter
19 lineBreakInterp = InlineCommandInterpreter {
22 = \ _ (InlineCommand _ attrs _) -> return $ LineBreak attrs
26 spanInterp :: Interpreter
27 spanInterp = InlineCommandInterpreter {
30 = \ _ (InlineCommand _ attrs contents) -> return $ Span attrs contents
34 divInterp :: Interpreter
35 divInterp = BlockCommandInterpreter {
38 = \ _ (BlockCommand _ attrs contents) -> return $ Div attrs contents
42 pageNameInterp :: Interpreter
43 pageNameInterp = InlineCommandInterpreter {
46 = \ ctx _ -> return $ Text (ctxPageName ctx)