pandoc-slide-filter-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Text.Pandoc.Util.Filter

Synopsis

Documentation

attToString :: Attr -> String Source #

converts Attributes to String for usage in HTML

Also converts width=xxx and height=xxx to the corresponding style-attributes

convertToStyle :: [String] -> [(String, String)] -> [(String, String)] Source #

helper function for attToString, but can also be used if you want to extract styles from kv-pair

revealjsSpecialAttrs :: [String] Source #

revealjs has some special attributes that has to be passed to the html, but Pandoc only allows key=value-attributes, so we have to abuse .class to rewrite them.

The classes that get rewritten are listed here.

You probably want classToRevealAttr, as that is a wrapper for splitting the class-attribute

revealjsRewriteAttr :: [String] -> [String] Source #

HTML allows for some attributes (i.e. autoplay) for which revealjs offers a special version (i.e. only autoplaying on active slide). These are the things that get rewritten

classToRevealAttr :: [String] -> ([String], [String]) Source #

revealjs has some special attributes that has to be passed to the html, but Pandoc only allows key=value-attributes, so we have to abuse .class to rewrite them.

This is a wrapper-function which just splits the list into real classes and revealjsSpecialAttrs

toHtml :: String -> Inline Source #

small wrapper around RawInline (Format "html") as this is less line-noise in the filters and the intent is more clear.

toBlockHtml :: String -> Block Source #

small wrapper around Raw (Format "html") as this is less line-noise in the filters and the intent is more clear.

addToAtt :: Eq a => a -> [a] -> [a] Source #

adds a given String to the list if not in there; Does nothing if the given String is already present.

addToStyle :: String -> [(String, String)] -> [(String, String)] Source #

adds given String to List of key-value-pairs (like in Attr) in the "style"-Key.

Useful when trying to add CSS-styles directly to (generated) elements