jira-wiki-markup-1.1.4: Handle Jira wiki markup

Copyright© 2019–2020 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb@zeitkraut.de>
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Text.Jira.Parser.Core

Contents

Description

Core components of the Jira wiki markup parser.

Synopsis

Jira parser and state

type JiraParser = Parsec Text ParserState #

Jira Parsec parser

data ParserState #

Parser state used to keep track of various parameteres.

Constructors

ParserState 

Fields

defaultState :: ParserState #

Default parser state (i.e., start state)

parseJira :: JiraParser a -> Text -> Either ParseError a #

Parses a string with the given Jira parser.

withStateFlag :: (Bool -> ParserState -> ParserState) -> JiraParser a -> JiraParser a #

Set a flag in the parser to True before running a parser, then set the flag's value to False.

String position tracking

updateLastStrPos :: JiraParser () #

Updates the state, marking the current input position as the end of a string.

notAfterString :: JiraParser Bool #

Checks whether the parser is directly after a string.

Parsing helpers

endOfPara :: JiraParser () #

Succeeds if the parser is looking at the end of a paragraph.

notFollowedBy' :: Show a => JiraParser a -> JiraParser () #

Variant of parsec's notFollowedBy function which properly fails even if the given parser does not consume any input (like eof does).

blankline :: JiraParser () #

Parses an empty line, i.e., a line with no chars or whitespace only.

skipSpaces :: JiraParser () #

Skip zero or more space chars.

parameters :: JiraParser (Maybe Text, [Parameter]) #

Parses a set of panel parameters