<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>Text.Pandoc.Util.Filter</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scriptsrc="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter.html");};
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="src/Text.Pandoc.Util.Filter.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">pandoc-slide-filter-0.1.0.0</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">Text.Pandoc.Util.Filter</p></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short"><ahref="#v:attToString">attToString</a> :: Attr -> String</li><liclass="src short"><ahref="#v:convertToStyle">convertToStyle</a> :: [String] -> [(String, String)] -> [(String, String)]</li><liclass="src short"><ahref="#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a> :: [String]</li><liclass="src short"><ahref="#v:revealjsRewriteAttr">revealjsRewriteAttr</a> :: [String] -> [String]</li><liclass="src short"><ahref="#v:classToRevealAttr">classToRevealAttr</a> :: [String] -> ([String], [String])</li><liclass="src short"><ahref="#v:toHtml">toHtml</a> :: String -> Inline</li><liclass="src short"><ahref="#v:toBlockHtml">toBlockHtml</a> :: String -> Block</li><liclass="src short"><ahref="#v:addToAtt">addToAtt</a> :: Eq a => a -> [a] -> [a]</li><liclass="src short"><ahref="#v:addToStyle">addToStyle</a> :: String -> [(String, String)] -> [(String, String)]</li></ul></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><aid="v:attToString"class="def">attToString</a> :: Attr -> String <ahref="src/Text.Pandoc.Util.Filter.html#attToString"class="link">Source</a><ahref="#v:attToString"class="selflink">#</a></p><divclass="doc"><p>converts Attributes to String for usage in HTML</p><p>Also converts <code>width=xxx</code> and <code>height=xxx</code> to the
corresponding style-attributes</p></div></div><divclass="top"><pclass="src"><aid="v:convertToStyle"class="def">convertToStyle</a> :: [String] -> [(String, String)] -> [(String, String)] <ahref="src/Text.Pandoc.Util.Filter.html#convertToStyle"class="link">Source</a><ahref="#v:convertToStyle"class="selflink">#</a></p><divclass="doc"><p>helper function for <code><ahref="Text-Pandoc-Util-Filter.html#v:attToString">attToString</a></code>, but can also be used
if you want to extract styles from kv-pair</p></div></div><divclass="top"><pclass="src"><aid="v:revealjsSpecialAttrs"class="def">revealjsSpecialAttrs</a> :: [String] <ahref="src/Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"class="link">Source</a><ahref="#v:revealjsSpecialAttrs"class="selflink">#</a></p><divclass="doc"><p>revealjs has some special attributes that has to be
<code>key=value</code>-attributes, so we have to abuse
<code>.class</code> to rewrite them.</p><p>The classes that get rewritten are listed here.</p><p>You probably want <code><ahref="Text-Pandoc-Util-Filter.html#v:classToRevealAttr">classToRevealAttr</a></code>, as that
is a wrapper for splitting the class-attribute</p></div></div><divclass="top"><pclass="src"><aid="v:revealjsRewriteAttr"class="def">revealjsRewriteAttr</a> :: [String] -> [String] <ahref="src/Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"class="link">Source</a><ahref="#v:revealjsRewriteAttr"class="selflink">#</a></p><divclass="doc"><p>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</p></div></div><divclass="top"><pclass="src"><aid="v:classToRevealAttr"class="def">classToRevealAttr</a> :: [String] -> ([String], [String]) <ahref="src/Text.Pandoc.Util.Filter.html#classToRevealAttr"class="link">Source</a><ahref="#v:classToRevealAttr"class="selflink">#</a></p><divclass="doc"><p>revealjs has some special attributes that has to be
into real classes and <code><ahref="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a></code></p></div></div><divclass="top"><pclass="src"><aid="v:toHtml"class="def">toHtml</a> :: String -> Inline <ahref="src/Text.Pandoc.Util.Filter.html#toHtml"class="link">Source</a><ahref="#v:toHtml"class="selflink">#</a></p><divclass="doc"><p>small wrapper around <code>RawInline (Format "html")</code>
intent is more clear.</p></div></div><divclass="top"><pclass="src"><aid="v:toBlockHtml"class="def">toBlockHtml</a> :: String -> Block <ahref="src/Text.Pandoc.Util.Filter.html#toBlockHtml"class="link">Source</a><ahref="#v:toBlockHtml"class="selflink">#</a></p><divclass="doc"><p>small wrapper around <code>Raw (Format "html")</code>
intent is more clear.</p></div></div><divclass="top"><pclass="src"><aid="v:addToAtt"class="def">addToAtt</a> :: Eq a => a -> [a] -> [a] <ahref="src/Text.Pandoc.Util.Filter.html#addToAtt"class="link">Source</a><ahref="#v:addToAtt"class="selflink">#</a></p><divclass="doc"><p>adds a given String to the list if not in there; Does nothing if the
given String is already present.</p></div></div><divclass="top"><pclass="src"><aid="v:addToStyle"class="def">addToStyle</a> :: String -> [(String, String)] -> [(String, String)] <ahref="src/Text.Pandoc.Util.Filter.html#addToStyle"class="link">Source</a><ahref="#v:addToStyle"class="selflink">#</a></p><divclass="doc"><p>adds given String to List of key-value-pairs (like in <code>Attr</code>)
in the "style"-Key.</p><p>Useful when trying to add CSS-styles directly to (generated) elements</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>