module Rakka.Wiki
( WikiPage
- , WikiElement(..)
, BlockElement(..)
, InlineElement(..)
+
+ , ListElement(..)
+ , ListType(..)
+ , ListItem
)
where
import Rakka.Page
-type WikiPage = [WikiElement]
-
-
-data WikiElement
- = Block !BlockElement
- | Inline !InlineElement
- deriving (Eq, Show)
+type WikiPage = [BlockElement]
data BlockElement
headingLevel :: !Int
, headingText :: !String
}
- | EmptyLine
+ | HorizontalLine
+ | List !ListElement
+ | LeadingSpaced ![InlineElement]
+ | Paragraph ![InlineElement]
deriving (Eq, Show)
, linkText :: !(Maybe String)
}
deriving (Eq, Show)
+
+
+data ListElement
+ = ListElement {
+ listType :: !ListType
+ , listItems :: ![ListItem]
+ }
+ deriving (Eq, Show)
+
+
+data ListType
+ = Bullet
+ | Numbered
+ deriving (Eq, Show)
+
+
+type ListItem = [Either ListElement InlineElement]