]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki.hs
Implemented inline images and framed images
[Rakka.git] / Rakka / Wiki.hs
index 0cf9a135fbdba2658a1da22a79f315908057e15b..f0e38fedd47994f629efdd6ae1f2dbe74ac4b784 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,9 @@ data InlineElement
       , linkText     :: !(Maybe String)
       }
     | LineBreak ![Attribute]
+    | Span ![Attribute] ![InlineElement]
+    | Image ![Attribute]
+    | Anchor ![Attribute] ![InlineElement]
     | InlineCmd !InlineCommand
     deriving (Eq, Show)
 
@@ -81,6 +87,15 @@ data CommandType
 type Attribute = (String, String)
 
 
+data BlockCommand
+    = BlockCommand {
+        bCmdName       :: !String
+      , bCmdAttributes :: ![Attribute]
+      , bCmdContents   :: ![BlockElement]
+      }
+    deriving (Eq, Show)
+
+
 data InlineCommand
     = InlineCommand {
         iCmdName       :: !String