html-entities-1.1.4.6: A codec library for HTML-escaped text and HTML-entities
Safe HaskellNone
LanguageHaskell2010

HTMLEntities.Parser

Description

Attoparsec parsers.

Synopsis

Documentation

htmlEntity :: Parser Text Source #

A parser of a single entity.

Parses numeric encoding:

>>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntity "©"
©

as well as the named entities:

>>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntity "©"
©

htmlEntityBody :: Parser Text Source #

A parser of the body of a single entity.

Parses numeric encoding:

>>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntityBody "#169"
©

as well as the named entities:

>>> mapM_ Data.Text.IO.putStrLn $ Data.Attoparsec.Text.parseOnly htmlEntityBody "copy"
©