]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki.hs
Implemented block commands
[Rakka.git] / Rakka / Wiki.hs
index 0cf9a135fbdba2658a1da22a79f315908057e15b..0bf23987b5ffed8c5368fd13d85695183a3b89c8 100644 (file)
@@ -11,6 +11,7 @@ module Rakka.Wiki
 
     , CommandType(..)
     , Attribute
+    , BlockCommand(..)
     , InlineCommand(..)
     )
     where
@@ -31,6 +32,8 @@ data BlockElement
     | DefinitionList ![Definition]
     | Preformatted ![InlineElement]
     | Paragraph ![InlineElement]
+    | Div ![Attribute] ![BlockElement]
+    | BlockCmd !BlockCommand
     deriving (Eq, Show)
 
 
@@ -44,6 +47,7 @@ data InlineElement
       , linkText     :: !(Maybe String)
       }
     | LineBreak ![Attribute]
+    | Span ![Attribute] ![InlineElement]
     | InlineCmd !InlineCommand
     deriving (Eq, Show)
 
@@ -81,6 +85,15 @@ data CommandType
 type Attribute = (String, String)
 
 
+data BlockCommand
+    = BlockCommand {
+        bCmdName       :: !String
+      , bCmdAttributes :: ![Attribute]
+      , bCmdContents   :: ![BlockElement]
+      }
+    deriving (Eq, Show)
+
+
 data InlineCommand
     = InlineCommand {
         iCmdName       :: !String