djot-0.1.2.2: Parser and renderer for djot light markup syntax.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Djot.Options

Synopsis

- newtype ParseOptions = ParseOptions {
  - sourcePositions :: SourcePosOption
  }
- newtype RenderOptions = RenderOptions {
  - preserveSoftBreaks :: Bool
  }
- data SourcePosOption
  - = NoSourcePos
  - | BlockSourcePos
  - | AllSourcePos

# Documentation

newtype ParseOptions #

Constructors

ParseOptions |
Fields sourcePositions :: SourcePosOption Add attributes for source lines

#### Instances

Instances details

Show ParseOptions # |
Instance details Defined in Djot.Options Methods showsPrec :: Int -> ParseOptions -> ShowS # show :: ParseOptions -> String # showList :: [ParseOptions] -> ShowS #

newtype RenderOptions #

Constructors

RenderOptions |
Fields preserveSoftBreaks :: Bool Preserve soft breaks as in the source

#### Instances

Instances details

Show RenderOptions # |
Instance details Defined in Djot.Options Methods showsPrec :: Int -> RenderOptions -> ShowS # show :: RenderOptions -> String # showList :: [RenderOptions] -> ShowS #

data SourcePosOption #

Adding source positions for blocks adds almost no overhead to parsing. Adding source positions for inlines has a small penalty. For many purposes it is enough to have source lines for blocks, so we offer the option.

Constructors

NoSourcePos |
BlockSourcePos |
AllSourcePos |

#### Instances

Instances details

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