literatex-0.3.0.0: transform literate source code to Markdown
CopyrightCopyright (c) 2021-2023 Travis Cardwell
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

LiterateX.Types.TargetFormat

Contents

Description

 
Synopsis

Type

data TargetFormat Source #

Target format

This sum type defines the supported target formats.

Documentation:

Since: 0.2.1.0

Instances

Instances details
Bounded TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Enum TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Show TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Eq TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Ord TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Parse TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Methods

parse :: (Textual t, Textual e) => t -> Either e TargetFormat #

Render TargetFormat Source # 
Instance details

Defined in LiterateX.Types.TargetFormat

Methods

render :: Textual t => TargetFormat -> t #

API

describe :: TargetFormat -> String Source #

Get a description of a target format

Since: 0.0.1.0

list :: [TargetFormat] Source #

List of all supported target formats

Since: 0.0.1.0

mkEndCode :: TargetFormat -> Text Source #

Make line in the target format to end a block of source code

Since: 0.0.1.0

mkBeginCode Source #

Arguments

:: TargetFormat 
-> Maybe CodeLanguage 
-> Bool

True to number code lines

-> Int -> Text

make line for code starting at specified line number

Make line in the target format to begin a block of code

This function is written to indicate how it is used. Given the target format, optional code language, and line numbering flag, this function returns a function that takes a line number and returns a line.

The MdBook format does not support per-block line numbering, so the line numbering flag is ignored for that format.

Since: 0.0.1.0