mmark-0.0.8.0: Strict markdown processor for writers
Copyright© 2017–present Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Text.MMark.Util

Description

Misc utilities.

Since: 0.0.8.0

Synopsis

Documentation

asPlainText :: NonEmpty Inline -> Text Source #

Convert a non-empty collection of Inlines into their plain text representation. This is used e.g. to render image descriptions.

Since: 0.0.8.0

headerId :: NonEmpty Inline -> Text Source #

Generate value of id attribute for a given header. This is used during rendering and also can be used to get id of a header for linking to it in extensions.

See also: headerFragment.

Since: 0.0.8.0

headerFragment :: Text -> URI Source #

Generate a URI containing only a fragment from its textual representation. Useful for getting URL from id of a header.

Since: 0.0.8.0