packages feed

casa-reoc-0.1.0.0: src/ReOC/Render/Markdown/Block.hs

{-# OPTIONS_GHC -Wall #-}

-- | A block of the markdown of the RePL training manual template.
module ReOC.Render.Markdown.Block (
  Block (..),
) where

import Data.Text (Text)

-- | A block of markdown. Text is inline markdown: @**strong**@, @*emphasis*@ and backslash escapes.
data Block
  = -- | A heading, with its level (1 to 4).
    Heading Int Text
  | -- | A paragraph.
    Paragraph Text
  | -- | A bulleted list: each item with its level of nesting, from 0.
    Bullets [(Int, Text)]
  | -- | A numbered list.
    Numbered [Text]
  | -- | A table: its header row and its other rows.
    Table [Text] [[Text]]
  deriving (Eq, Show)