pandoc-2.9.2.1: Conversion between markup formats

CopyrightCopyright (C) 2006-2020 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Text.Pandoc.XML

Description

Functions for escaping and formatting XML.

Synopsis

Documentation

escapeCharForXML :: Char -> Text Source #

Escape one character as needed for XML.

escapeStringForXML :: Text -> Text Source #

Escape string as needed for XML. Entity references are not preserved.

inTags :: (HasChars a, IsString a) => Bool -> Text -> [(Text, Text)] -> Doc a -> Doc a Source #

Put the supplied contents between start and end tags of tagType, with specified attributes and (if specified) indentation.

selfClosingTag :: (HasChars a, IsString a) => Text -> [(Text, Text)] -> Doc a Source #

Return a self-closing tag of tagType with specified attributes

inTagsSimple :: (HasChars a, IsString a) => Text -> Doc a -> Doc a Source #

Put the supplied contents between start and end tags of tagType.

inTagsIndented :: (HasChars a, IsString a) => Text -> Doc a -> Doc a Source #

Put the supplied contents in indented block btw start and end tags.

toEntities :: Text -> Text Source #

Escape all non-ascii characters using numerical entities.

toHtml5Entities :: Text -> Text Source #

Escape all non-ascii characters using HTML5 entities, falling back to numerical entities.