]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki.hs
Implemented more features
[Rakka.git] / Rakka / Wiki.hs
index 3b1802f0e4cc42928fc4341e03f2eb36116eb1a1..0cf9a135fbdba2658a1da22a79f315908057e15b 100644 (file)
@@ -6,6 +6,12 @@ module Rakka.Wiki
     , ListElement(..)
     , ListType(..)
     , ListItem
+
+    , Definition(..)
+
+    , CommandType(..)
+    , Attribute
+    , InlineCommand(..)
     )
     where
 
@@ -22,18 +28,23 @@ data BlockElement
       }
     | HorizontalLine
     | List !ListElement
-    | LeadingSpaced ![InlineElement]
+    | DefinitionList ![Definition]
+    | Preformatted ![InlineElement]
     | Paragraph ![InlineElement]
     deriving (Eq, Show)
 
 
 data InlineElement
     = Text !String
+    | Italic ![InlineElement]
+    | Bold ![InlineElement]
     | PageLink {
         linkPage     :: !(Maybe PageName)
       , linkFragment :: !(Maybe String)
       , linkText     :: !(Maybe String)
       }
+    | LineBreak ![Attribute]
+    | InlineCmd !InlineCommand
     deriving (Eq, Show)
 
 
@@ -52,3 +63,28 @@ data ListType
 
 
 type ListItem = [Either ListElement InlineElement]
+
+
+data Definition
+    = Definition {
+        defTerm :: ![InlineElement]
+      , defDesc :: ![InlineElement]
+      }
+    deriving (Eq, Show)
+
+
+data CommandType
+    = InlineCommandType
+    | BlockCommandType
+
+
+type Attribute = (String, String)
+
+
+data InlineCommand
+    = InlineCommand {
+        iCmdName       :: !String
+      , iCmdAttributes :: ![Attribute]
+      , iCmdContents   :: ![InlineElement]
+      }
+    deriving (Eq, Show)