aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Definition.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Definition.hs')
-rw-r--r--src/Text/Pandoc/Definition.hs21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Definition.hs b/src/Text/Pandoc/Definition.hs
index a1abfcb50..3d3858b7e 100644
--- a/src/Text/Pandoc/Definition.hs
+++ b/src/Text/Pandoc/Definition.hs
@@ -45,6 +45,23 @@ data Alignment = AlignLeft
| AlignCenter
| AlignDefault deriving (Eq, Show, Read)
+-- | List attributes.
+type ListAttributes = (Int, ListNumberStyle, ListNumberDelim)
+
+-- | Style of list numbers.
+data ListNumberStyle = DefaultStyle
+ | Decimal
+ | LowerRoman
+ | UpperRoman
+ | LowerAlpha
+ | UpperAlpha deriving (Eq, Show, Read)
+
+-- | Delimiter of list numbers.
+data ListNumberDelim = DefaultDelim
+ | Period
+ | OneParen
+ | TwoParens deriving (Eq, Show, Read)
+
-- | Block element.
data Block
= Plain [Inline] -- ^ Plain text, not a paragraph
@@ -53,8 +70,8 @@ data Block
| CodeBlock String -- ^ Code block (literal)
| RawHtml String -- ^ Raw HTML block (literal)
| BlockQuote [Block] -- ^ Block quote (list of blocks)
- | OrderedList [[Block]] -- ^ Ordered list (list of items, each
- -- a list of blocks)
+ | OrderedList ListAttributes [[Block]] -- ^ Ordered list (attributes,
+ -- and a list of items, each a list of blocks)
| BulletList [[Block]] -- ^ Bullet list (list of items, each
-- a list of blocks)
| DefinitionList [([Inline],[Block])] -- ^ Definition list