zenacy-html-2.0.2: A standard compliant HTML parsing library

Safe HaskellSafe
LanguageHaskell2010

Zenacy.HTML.Internal.Image

Description

Defines html image handling functions.

Synopsis

Documentation

htmlSrcsetParse :: Text -> HTMLSrcset Source #

Parses a srcset attribute value.

htmlSrcsetParseCandidate :: Text -> Maybe HTMLSrcsetCandidate Source #

Parses a srcset candidate value.

htmlSrcsetParseDescriptor :: Text -> HTMLSrcsetDescriptor Source #

Parses a srcset descriptor value.

htmlSrcsetRender :: HTMLSrcset -> Text Source #

Renders a srcset.

htmlSrcsetRenderCandidate :: HTMLSrcsetCandidate -> Text Source #

Renders a srcset candidate.

htmlSrcsetRenderDescriptor :: HTMLSrcsetDescriptor -> Text Source #

Renders a srcset descriptor.

htmlSrcsetListURL :: HTMLSrcset -> [Text] Source #

Returns the URLs for a srcset.

htmlSrcsetMapURL :: (Text -> Text) -> HTMLSrcset -> HTMLSrcset Source #

Maps a function over the srcset URLs.

htmlSrcsetImageMin :: HTMLSrcset -> Text Source #

Returns the smallest image in the srcset.

htmlSrcsetImageMax :: HTMLSrcset -> Text Source #

Returns the largest image in the srcset.

htmlSrcsetDescriptorSize :: HTMLSrcsetDescriptor -> Int Source #

Gets the size of the descriptor.

htmlSrcsetCandidatePair :: HTMLSrcsetCandidate -> (Int, Text) Source #

Converts a candidate to a pair.

htmlSrcsetFilter :: (HTMLSrcsetCandidate -> Bool) -> HTMLSrcset -> HTMLSrcset Source #

Filter candidates from a srcset.