]> gitweb @ CieloNegro.org - Rakka.git/blob - Rakka/Wiki/Interpreter/Base.hs
437705dbdecbdfe7305acd7393d0d421ca104500
[Rakka.git] / Rakka / Wiki / Interpreter / Base.hs
1 module Rakka.Wiki.Interpreter.Base
2     ( baseInterpreters
3     )
4     where
5
6 import           Rakka.Wiki
7 import           Rakka.Wiki.Interpreter
8 import           Rakka.Wiki.Interpreter.Base.Image
9
10
11 baseInterpreters :: [Interpreter]
12 baseInterpreters = [ lineBreakInterp
13                    , spanInterp
14                    , divInterp
15                    , imageInterp
16                    , imgFrameInterp
17                    ]
18
19
20 lineBreakInterp :: Interpreter
21 lineBreakInterp = pureInlineInterp "br" interpret
22     where
23       interpret (InlineCommand _ attrs _) _ = LineBreak attrs
24
25
26 spanInterp :: Interpreter
27 spanInterp = pureInlineInterp "span" interpret
28     where
29       interpret (InlineCommand _ attrs contents) _ = Span attrs contents
30
31
32 divInterp :: Interpreter
33 divInterp = pureBlockInterp "div" interpret
34     where
35       interpret (BlockCommand _ attrs contents) _ = Div attrs contents