jira-wiki-markup-1.4.0: Handle Jira wiki markup

Copyright | © 2019–2021 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@zeitkraut.de>
Stability | alpha
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Jira.Markup

Description

Jira markup types.

Synopsis

- newtype Doc = Doc {
  - fromDoc :: [Block]
  }
- data Block
  - = Code Language [Parameter] Text
  - | Color ColorName [Block]
  - | BlockQuote [Block]
  - | Header Int [Inline]
  - | HorizontalRule
  - | List ListStyle [[Block]]
  - | NoFormat [Parameter] Text
  - | Panel [Parameter] [Block]
  - | Para [Inline]
  - | Table [Row]
- data Inline
  - = Anchor Text
  - | AutoLink URL
  - | Citation [Inline]
  - | ColorInline ColorName [Inline]
  - | Emoji Icon
  - | Entity Text
  - | Image [Parameter] URL
  - | Linebreak
  - | Link LinkType [Inline] URL
  - | Monospaced [Inline]
  - | Space
  - | SpecialChar Char
  - | Str Text
  - | Styled InlineStyle [Inline]
- data InlineStyle
  - = Emphasis
  - | Insert
  - | Strikeout
  - | Strong
  - | Subscript
  - | Superscript
- data LinkType
  - = Attachment
  - | Email
  - | External
  - | SmartCard
  - | SmartLink
  - | User
- data ListStyle
  - = CircleBullets
  - | SquareBullets
  - | Enumeration
- newtype URL = URL {
  - fromURL :: Text
  }
- newtype ColorName = ColorName Text
- data Icon
  - = IconSlightlySmiling
  - | IconFrowning
  - | IconTongue
  - | IconSmiling
  - | IconWinking
  - | IconThumbsUp
  - | IconThumbsDown
  - | IconInfo
  - | IconCheckmark
  - | IconX
  - | IconAttention
  - | IconPlus
  - | IconMinus
  - | IconQuestionmark
  - | IconOn
  - | IconOff
  - | IconStar
  - | IconStarRed
  - | IconStarGreen
  - | IconStarBlue
  - | IconStarYellow
  - | IconFlag
  - | IconFlagOff
- newtype Row = Row {
  - fromRow :: [Cell]
  }
- data Cell
  - = BodyCell [Block]
  - | HeaderCell [Block]
- newtype Language = Language Text
- data Parameter = Parameter {
  - parameterKey :: Text
  - parameterValue :: Text
  }
- normalizeInlines :: [Inline] -> [Inline]
- iconText :: Icon -> Text

# Documentation

newtype Doc #

Jira document

Constructors

Doc |
Fields fromDoc :: [Block]

#### Instances

Instances details

Eq Doc # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Doc -> Doc -> Bool # (/=) :: Doc -> Doc -> Bool #
Ord Doc # |
Instance details Defined in Text.Jira.Markup Methods compare :: Doc -> Doc -> Ordering # (<) :: Doc -> Doc -> Bool # (<=) :: Doc -> Doc -> Bool # (>) :: Doc -> Doc -> Bool # (>=) :: Doc -> Doc -> Bool # max :: Doc -> Doc -> Doc # min :: Doc -> Doc -> Doc #
Show Doc # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Doc -> ShowS # show :: Doc -> String # showList :: [Doc] -> ShowS #

data Block #

Blocks of text.

Constructors

Code Language [Parameter] Text | Code block with panel parameters
Color ColorName [Block] | text displayed in a specific color
BlockQuote [Block] | Block of quoted content
Header Int [Inline] | Header with level and text
HorizontalRule | horizontal ruler
List ListStyle [[Block]] | List
NoFormat [Parameter] Text | Unformatted text
Panel [Parameter] [Block] | Formatted panel
Para [Inline] | Paragraph of text
Table [Row] | Table

#### Instances

Instances details

Eq Block # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Block -> Block -> Bool # (/=) :: Block -> Block -> Bool #
Ord Block # |
Instance details Defined in Text.Jira.Markup Methods compare :: Block -> Block -> Ordering # (<) :: Block -> Block -> Bool # (<=) :: Block -> Block -> Bool # (>) :: Block -> Block -> Bool # (>=) :: Block -> Block -> Bool # max :: Block -> Block -> Block # min :: Block -> Block -> Block #
Show Block # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Block -> ShowS # show :: Block -> String # showList :: [Block] -> ShowS #

data Inline #

Inline Jira markup elements.

Constructors

Anchor Text | anchor for internal links
AutoLink URL | URL which is also a link
Citation [Inline] | source of a citation
ColorInline ColorName [Inline] | colored inline text
Emoji Icon | emoticon
Entity Text | named or numeric HTML entity
Image [Parameter] URL | an image
Linebreak | hard linebreak
Link LinkType [Inline] URL | hyperlink with alias
Monospaced [Inline] | text rendered with monospaced font
Space | space between words
SpecialChar Char | single char with special meaning
Str Text | simple, markup-less string
Styled InlineStyle [Inline] | styled text

#### Instances

Instances details

Eq Inline # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Inline -> Inline -> Bool # (/=) :: Inline -> Inline -> Bool #
Ord Inline # |
Instance details Defined in Text.Jira.Markup Methods compare :: Inline -> Inline -> Ordering # (<) :: Inline -> Inline -> Bool # (<=) :: Inline -> Inline -> Bool # (>) :: Inline -> Inline -> Bool # (>=) :: Inline -> Inline -> Bool # max :: Inline -> Inline -> Inline # min :: Inline -> Inline -> Inline #
Show Inline # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Inline -> ShowS # show :: Inline -> String # showList :: [Inline] -> ShowS #

data InlineStyle #

Supported inline text effect styles.

Constructors

Emphasis | emphasized text
Insert | text marked as having been inserted
Strikeout | deleted (struk-out) text
Strong | strongly emphasized text
Subscript | subscript text
Superscript | superscript text

#### Instances

Instances details

Eq InlineStyle # |
Instance details Defined in Text.Jira.Markup Methods (==) :: InlineStyle -> InlineStyle -> Bool # (/=) :: InlineStyle -> InlineStyle -> Bool #
Ord InlineStyle # |
Instance details Defined in Text.Jira.Markup Methods compare :: InlineStyle -> InlineStyle -> Ordering # (<) :: InlineStyle -> InlineStyle -> Bool # (<=) :: InlineStyle -> InlineStyle -> Bool # (>) :: InlineStyle -> InlineStyle -> Bool # (>=) :: InlineStyle -> InlineStyle -> Bool # max :: InlineStyle -> InlineStyle -> InlineStyle # min :: InlineStyle -> InlineStyle -> InlineStyle #
Show InlineStyle # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> InlineStyle -> ShowS # show :: InlineStyle -> String # showList :: [InlineStyle] -> ShowS #

data LinkType #

Type of a link.

Constructors

Attachment | link to an attachment
Email | link to an email address
External | external resource, like a website
SmartCard | smart-card link (external)
SmartLink | "smart" link with icon, short-name
User | link to a user

#### Instances

Instances details

Eq LinkType # |
Instance details Defined in Text.Jira.Markup Methods (==) :: LinkType -> LinkType -> Bool # (/=) :: LinkType -> LinkType -> Bool #
Ord LinkType # |
Instance details Defined in Text.Jira.Markup Methods compare :: LinkType -> LinkType -> Ordering # (<) :: LinkType -> LinkType -> Bool # (<=) :: LinkType -> LinkType -> Bool # (>) :: LinkType -> LinkType -> Bool # (>=) :: LinkType -> LinkType -> Bool # max :: LinkType -> LinkType -> LinkType # min :: LinkType -> LinkType -> LinkType #
Show LinkType # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> LinkType -> ShowS # show :: LinkType -> String # showList :: [LinkType] -> ShowS #

data ListStyle #

Style used for list items.

Constructors

CircleBullets | List with round bullets
SquareBullets | List with square bullets
Enumeration | Enumeration, i.e., numbered items

#### Instances

Instances details

Eq ListStyle # |
Instance details Defined in Text.Jira.Markup Methods (==) :: ListStyle -> ListStyle -> Bool # (/=) :: ListStyle -> ListStyle -> Bool #
Ord ListStyle # |
Instance details Defined in Text.Jira.Markup Methods compare :: ListStyle -> ListStyle -> Ordering # (<) :: ListStyle -> ListStyle -> Bool # (<=) :: ListStyle -> ListStyle -> Bool # (>) :: ListStyle -> ListStyle -> Bool # (>=) :: ListStyle -> ListStyle -> Bool # max :: ListStyle -> ListStyle -> ListStyle # min :: ListStyle -> ListStyle -> ListStyle #
Show ListStyle # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> ListStyle -> ShowS # show :: ListStyle -> String # showList :: [ListStyle] -> ShowS #

newtype URL #

Unified resource location

Constructors

URL |
Fields fromURL :: Text

#### Instances

Instances details

Eq URL # |
Instance details Defined in Text.Jira.Markup Methods (==) :: URL -> URL -> Bool # (/=) :: URL -> URL -> Bool #
Ord URL # |
Instance details Defined in Text.Jira.Markup Methods compare :: URL -> URL -> Ordering # (<) :: URL -> URL -> Bool # (<=) :: URL -> URL -> Bool # (>) :: URL -> URL -> Bool # (>=) :: URL -> URL -> Bool # max :: URL -> URL -> URL # min :: URL -> URL -> URL #
Show URL # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> URL -> ShowS # show :: URL -> String # showList :: [URL] -> ShowS #

newtype ColorName #

Text color

Constructors

ColorName Text |

#### Instances

Instances details

Eq ColorName # |
Instance details Defined in Text.Jira.Markup Methods (==) :: ColorName -> ColorName -> Bool # (/=) :: ColorName -> ColorName -> Bool #
Ord ColorName # |
Instance details Defined in Text.Jira.Markup Methods compare :: ColorName -> ColorName -> Ordering # (<) :: ColorName -> ColorName -> Bool # (<=) :: ColorName -> ColorName -> Bool # (>) :: ColorName -> ColorName -> Bool # (>=) :: ColorName -> ColorName -> Bool # max :: ColorName -> ColorName -> ColorName # min :: ColorName -> ColorName -> ColorName #
Show ColorName # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> ColorName -> ShowS # show :: ColorName -> String # showList :: [ColorName] -> ShowS #

data Icon #

Graphical emoticons

Constructors

IconSlightlySmiling |
IconFrowning |
IconTongue |
IconSmiling |
IconWinking |
IconThumbsUp |
IconThumbsDown |
IconInfo |
IconCheckmark |
IconX |
IconAttention |
IconPlus |
IconMinus |
IconQuestionmark |
IconOn |
IconOff |
IconStar |
IconStarRed |
IconStarGreen |
IconStarBlue |
IconStarYellow |
IconFlag |
IconFlagOff |

#### Instances

Instances details

Enum Icon # |
Instance details Defined in Text.Jira.Markup Methods succ :: Icon -> Icon # pred :: Icon -> Icon # toEnum :: Int -> Icon # fromEnum :: Icon -> Int # enumFrom :: Icon -> [Icon] # enumFromThen :: Icon -> Icon -> [Icon] # enumFromTo :: Icon -> Icon -> [Icon] # enumFromThenTo :: Icon -> Icon -> Icon -> [Icon] #
Eq Icon # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Icon -> Icon -> Bool # (/=) :: Icon -> Icon -> Bool #
Ord Icon # |
Instance details Defined in Text.Jira.Markup Methods compare :: Icon -> Icon -> Ordering # (<) :: Icon -> Icon -> Bool # (<=) :: Icon -> Icon -> Bool # (>) :: Icon -> Icon -> Bool # (>=) :: Icon -> Icon -> Bool # max :: Icon -> Icon -> Icon # min :: Icon -> Icon -> Icon #
Show Icon # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Icon -> ShowS # show :: Icon -> String # showList :: [Icon] -> ShowS #

newtype Row #

Table row, containing an arbitrary number of cells.

Constructors

Row |
Fields fromRow :: [Cell]

#### Instances

Instances details

Eq Row # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Row -> Row -> Bool # (/=) :: Row -> Row -> Bool #
Ord Row # |
Instance details Defined in Text.Jira.Markup Methods compare :: Row -> Row -> Ordering # (<) :: Row -> Row -> Bool # (<=) :: Row -> Row -> Bool # (>) :: Row -> Row -> Bool # (>=) :: Row -> Row -> Bool # max :: Row -> Row -> Row # min :: Row -> Row -> Row #
Show Row # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Row -> ShowS # show :: Row -> String # showList :: [Row] -> ShowS #

data Cell #

Table cell with block content

Constructors

BodyCell [Block] |
HeaderCell [Block] |

#### Instances

Instances details

Eq Cell # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Cell -> Cell -> Bool # (/=) :: Cell -> Cell -> Bool #
Ord Cell # |
Instance details Defined in Text.Jira.Markup Methods compare :: Cell -> Cell -> Ordering # (<) :: Cell -> Cell -> Bool # (<=) :: Cell -> Cell -> Bool # (>) :: Cell -> Cell -> Bool # (>=) :: Cell -> Cell -> Bool # max :: Cell -> Cell -> Cell # min :: Cell -> Cell -> Cell #
Show Cell # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Cell -> ShowS # show :: Cell -> String # showList :: [Cell] -> ShowS #

newtype Language #

Programming language used for syntax highlighting.

Constructors

Language Text |

#### Instances

Instances details

Eq Language # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Language -> Language -> Bool # (/=) :: Language -> Language -> Bool #
Ord Language # |
Instance details Defined in Text.Jira.Markup Methods compare :: Language -> Language -> Ordering # (<) :: Language -> Language -> Bool # (<=) :: Language -> Language -> Bool # (>) :: Language -> Language -> Bool # (>=) :: Language -> Language -> Bool # max :: Language -> Language -> Language # min :: Language -> Language -> Language #
Show Language # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Language -> ShowS # show :: Language -> String # showList :: [Language] -> ShowS #

data Parameter #

Panel parameter

Constructors

Parameter |
Fields parameterKey :: Text parameterValue :: Text

#### Instances

Instances details

Eq Parameter # |
Instance details Defined in Text.Jira.Markup Methods (==) :: Parameter -> Parameter -> Bool # (/=) :: Parameter -> Parameter -> Bool #
Ord Parameter # |
Instance details Defined in Text.Jira.Markup Methods compare :: Parameter -> Parameter -> Ordering # (<) :: Parameter -> Parameter -> Bool # (<=) :: Parameter -> Parameter -> Bool # (>) :: Parameter -> Parameter -> Bool # (>=) :: Parameter -> Parameter -> Bool # max :: Parameter -> Parameter -> Parameter # min :: Parameter -> Parameter -> Parameter #
Show Parameter # |
Instance details Defined in Text.Jira.Markup Methods showsPrec :: Int -> Parameter -> ShowS # show :: Parameter -> String # showList :: [Parameter] -> ShowS #

normalizeInlines :: [Inline] -> [Inline] #

Normalize a list of inlines, merging elements where possible.

iconText :: Icon -> Text #

Gets the characters used to represent an emoji.