]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki.hs
Implemented inline images and framed images
[Rakka.git] / Rakka / Wiki.hs
index b8be3a3fabf8bc5d3a56ef77cdd9207da6c81baf..f0e38fedd47994f629efdd6ae1f2dbe74ac4b784 100644 (file)
@@ -8,6 +8,11 @@ module Rakka.Wiki
     , ListItem
 
     , Definition(..)
+
+    , CommandType(..)
+    , Attribute
+    , BlockCommand(..)
+    , InlineCommand(..)
     )
     where
 
@@ -27,6 +32,8 @@ data BlockElement
     | DefinitionList ![Definition]
     | Preformatted ![InlineElement]
     | Paragraph ![InlineElement]
+    | Div ![Attribute] ![BlockElement]
+    | BlockCmd !BlockCommand
     deriving (Eq, Show)
 
 
@@ -39,6 +46,11 @@ data InlineElement
       , linkFragment :: !(Maybe String)
       , linkText     :: !(Maybe String)
       }
+    | LineBreak ![Attribute]
+    | Span ![Attribute] ![InlineElement]
+    | Image ![Attribute]
+    | Anchor ![Attribute] ![InlineElement]
+    | InlineCmd !InlineCommand
     deriving (Eq, Show)
 
 
@@ -64,4 +76,30 @@ data Definition
         defTerm :: ![InlineElement]
       , defDesc :: ![InlineElement]
       }
-    deriving (Eq, Show)
\ No newline at end of file
+    deriving (Eq, Show)
+
+
+data CommandType
+    = InlineCommandType
+    | BlockCommandType
+
+
+type Attribute = (String, String)
+
+
+data BlockCommand
+    = BlockCommand {
+        bCmdName       :: !String
+      , bCmdAttributes :: ![Attribute]
+      , bCmdContents   :: ![BlockElement]
+      }
+    deriving (Eq, Show)
+
+
+data InlineCommand
+    = InlineCommand {
+        iCmdName       :: !String
+      , iCmdAttributes :: ![Attribute]
+      , iCmdContents   :: ![InlineElement]
+      }
+    deriving (Eq, Show)