HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulecommonmark-0.3.1Haskell2010

Commonmark.Inlines

  • 5 types
  • 19 values
  • Packagecommonmark-0.3.1
  • Exports24
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInlines.hs

Type of the token immediately preceding the current position, if recorded. Preceding token types are recorded for positions of delimiter characters, and for word tokens preceded by a symbol. Nothing at the start of a word token means it begins the input or is preceded by whitespace.

datadata FormattingSpec il
#

Constructors

Instances1Show
valueprocessBrackets
  1. :: IsInline a
  2. => [BracketedSpec a]
  3. -> ReferenceMap
  4. -> [Chunk a]
  5. -> Map Text SourcePos
  6. -> Either (DState a) [Chunk a]
#

Process square brackets: links, images, and the span extension.

DState tracks the current position and backtracking limits.

If this function succeeds, returning Right, it will return a list of chunks, now annotated with bracket information.

If this function fails, it will return `Left DState`. This can happen if a chunk straddles a link destination, like this

link text looks like code` ^-----------------^

To recover, the caller must re-Chunk everything after the end paren. The bottoms parameter, in particular, is DState's stackBottoms, and is used to prevent things before the paren from being re-parsed.