regenerated doc

This commit is contained in:
Nicole Dresselhaus 2017-09-12 11:53:21 +02:00
parent e133b26e62
commit e8f434810c
Signed by: Drezil
GPG Key ID: 057D94F356F41E25
15 changed files with 533 additions and 326 deletions

30
doc/LICENSE Normal file
View File

@ -0,0 +1,30 @@
Copyright Stefan Dresselhaus (c) 2017
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Author name here nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -2,7 +2,7 @@
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter-Cols.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Cols.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Cols</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Conversion of lvl-x-headings to x-column-layouts in HTML
especially for use in revealjs-slides</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:cols">cols</a> :: [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>] -&gt; [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:cols" class="def">cols</a> :: [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>] -&gt; [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>] <a href="src/Text.Pandoc.Util.Filter.Cols.html#cols" class="link">Source</a> <a href="#v:cols" class="selflink">#</a></p><div class="doc"><p>This filter makes multi-column-layouts out of lvl-x-headings</p><p>Syntax is</p><pre> ## a b
especially for use in revealjs-slides</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:cols">cols</a> :: [Block] -&gt; [Block]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:cols" class="def">cols</a> :: [Block] -&gt; [Block] <a href="src/Text.Pandoc.Util.Filter.Cols.html#cols" class="link">Source</a> <a href="#v:cols" class="selflink">#</a></p><div class="doc"><p>This filter makes multi-column-layouts out of lvl-x-headings</p><p>Syntax is</p><pre> ## a b
</pre><p>yielding a 2-column-layout with aspects a:b i.e. 1:1 for 50/50-layout
or 8:2 for 80/20 layout</p><p>currently works for 2 and 3-columns, but extension is straight-forward.</p><p>If you need multiple Block-Elements inside one column, just wrap them
with a <code>&lt;div&gt;</code>:</p><pre> ## 2 5

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter.Media</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter-Media.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Media.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Media</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:media">media</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a>]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:media" class="def">media</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a>] <a href="src/Text.Pandoc.Util.Filter.Media.html#media" class="link">Source</a> <a href="#v:media" class="selflink">#</a></p><div class="doc"><p>main media-plugin.</p><p>Will convert the following syntax</p><pre>![](foo.aac){#audio}
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Media.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Media</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:media">media</a> :: Inline -&gt; IO [Inline]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:media" class="def">media</a> :: Inline -&gt; IO [Inline] <a href="src/Text.Pandoc.Util.Filter.Media.html#media" class="link">Source</a> <a href="#v:media" class="selflink">#</a></p><div class="doc"><p>main media-plugin.</p><p>Will convert the following syntax</p><pre>![](foo.aac){#audio}
![](foo.mp4){#video}
![](foo.png){#img}
![](foo.svg){#svg}

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter.Quiz</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter-Quiz.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Quiz.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Quiz</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:quiz" class="def">quiz</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a> -&gt; [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>] <a href="src/Text.Pandoc.Util.Filter.Quiz.html#quiz" class="link">Source</a> <a href="#v:quiz" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Quiz.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Quiz</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:quiz" class="def">quiz</a> :: Block -&gt; [Block] <a href="src/Text.Pandoc.Util.Filter.Quiz.html#quiz" class="link">Source</a> <a href="#v:quiz" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter.Styling</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter-Styling.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Styling.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Styling</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:styling">styling</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>]</li><li class="src short"><a href="#v:inlineStyling">inlineStyling</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:styling" class="def">styling</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a>] <a href="src/Text.Pandoc.Util.Filter.Styling.html#styling" class="link">Source</a> <a href="#v:styling" class="selflink">#</a></p><div class="doc"><p>Block-Styling</p><p>Special cases captured:</p><ul><li>#col turns a div into a floating-div for multiple columns</li><li>CodeBlock gets attributes <code>data-trim</code> and <code>data-noescape</code>
automatically</li><li>.fragment and .frame work properly on divs</li></ul></div></div><div class="top"><p class="src"><a id="v:inlineStyling" class="def">inlineStyling</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> <a href="src/Text.Pandoc.Util.Filter.Styling.html#inlineStyling" class="link">Source</a> <a href="#v:inlineStyling" class="selflink">#</a></p><div class="doc"><p>Inline-Styling</p><p>Special cases captured:</p><ul><li>.fragment and .frame work properly on spans</li><li>.vspace inside span adds a vertical space with <code>height=xxx</code></li><li>.hspace inside span adds a horizontal space with <code>width=xxx</code></li></ul></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.Styling.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter.Styling</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:styling">styling</a> :: Block -&gt; IO [Block]</li><li class="src short"><a href="#v:inlineStyling">inlineStyling</a> :: Inline -&gt; Inline</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:styling" class="def">styling</a> :: Block -&gt; IO [Block] <a href="src/Text.Pandoc.Util.Filter.Styling.html#styling" class="link">Source</a> <a href="#v:styling" class="selflink">#</a></p><div class="doc"><p>Block-Styling</p><p>Special cases captured:</p><ul><li>#col turns a div into a floating-div for multiple columns</li><li>CodeBlock gets attributes <code>data-trim</code> and <code>data-noescape</code>
automatically</li><li>.fragment and .frame work properly on divs</li></ul></div></div><div class="top"><p class="src"><a id="v:inlineStyling" class="def">inlineStyling</a> :: Inline -&gt; Inline <a href="src/Text.Pandoc.Util.Filter.Styling.html#inlineStyling" class="link">Source</a> <a href="#v:inlineStyling" class="selflink">#</a></p><div class="doc"><p>Inline-Styling</p><p>Special cases captured:</p><ul><li>.fragment and .frame work properly on spans</li><li>.vspace inside span adds a vertical space with <code>height=xxx</code></li><li>.hspace inside span adds a horizontal space with <code>width=xxx</code></li></ul></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>

View File

@ -1,19 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Pandoc-Util-Filter.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:attToString">attToString</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Attr">Attr</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:classToRevealAttr">classToRevealAttr</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>] -&gt; ([<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>], [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>])</li><li class="src short"><a href="#v:toHtml">toHtml</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a></li><li class="src short"><a href="#v:toBlockHtml">toBlockHtml</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a></li><li class="src short"><a href="#v:addToAtt">addToAtt</a> :: <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:addToStyle">addToStyle</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; [(<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)] -&gt; [(<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:attToString" class="def">attToString</a> :: <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Attr">Attr</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text.Pandoc.Util.Filter.html#attToString" class="link">Source</a> <a href="#v:attToString" class="selflink">#</a></p><div class="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><div class="top"><p class="src"><a id="v:revealjsSpecialAttrs" class="def">revealjsSpecialAttrs</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs" class="link">Source</a> <a href="#v:revealjsSpecialAttrs" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text.Pandoc.Util.Filter.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Pandoc.Util.Filter</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:attToString">attToString</a> :: Attr -&gt; String</li><li class="src short"><a href="#v:convertToStyle">convertToStyle</a> :: [String] -&gt; [(String, String)] -&gt; [(String, String)]</li><li class="src short"><a href="#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a> :: [String]</li><li class="src short"><a href="#v:revealjsRewriteAttr">revealjsRewriteAttr</a> :: [String] -&gt; [String]</li><li class="src short"><a href="#v:classToRevealAttr">classToRevealAttr</a> :: [String] -&gt; ([String], [String])</li><li class="src short"><a href="#v:toHtml">toHtml</a> :: String -&gt; Inline</li><li class="src short"><a href="#v:toBlockHtml">toBlockHtml</a> :: String -&gt; Block</li><li class="src short"><a href="#v:addToAtt">addToAtt</a> :: Eq a =&gt; a -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:addToStyle">addToStyle</a> :: String -&gt; [(String, String)] -&gt; [(String, String)]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:attToString" class="def">attToString</a> :: Attr -&gt; String <a href="src/Text.Pandoc.Util.Filter.html#attToString" class="link">Source</a> <a href="#v:attToString" class="selflink">#</a></p><div class="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><div class="top"><p class="src"><a id="v:convertToStyle" class="def">convertToStyle</a> :: [String] -&gt; [(String, String)] -&gt; [(String, String)] <a href="src/Text.Pandoc.Util.Filter.html#convertToStyle" class="link">Source</a> <a href="#v:convertToStyle" class="selflink">#</a></p><div class="doc"><p>helper function for <code><a href="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><div class="top"><p class="src"><a id="v:revealjsSpecialAttrs" class="def">revealjsSpecialAttrs</a> :: [String] <a href="src/Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs" class="link">Source</a> <a href="#v:revealjsSpecialAttrs" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
passed to the html, but Pandoc only allows
<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><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr">classToRevealAttr</a></code>, as that
is a wrapper for splitting the class-attribute</p></div></div><div class="top"><p class="src"><a id="v:classToRevealAttr" class="def">classToRevealAttr</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>] -&gt; ([<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>], [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>]) <a href="src/Text.Pandoc.Util.Filter.html#classToRevealAttr" class="link">Source</a> <a href="#v:classToRevealAttr" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
is a wrapper for splitting the class-attribute</p></div></div><div class="top"><p class="src"><a id="v:revealjsRewriteAttr" class="def">revealjsRewriteAttr</a> :: [String] -&gt; [String] <a href="src/Text.Pandoc.Util.Filter.html#revealjsRewriteAttr" class="link">Source</a> <a href="#v:revealjsRewriteAttr" class="selflink">#</a></p><div class="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><div class="top"><p class="src"><a id="v:classToRevealAttr" class="def">classToRevealAttr</a> :: [String] -&gt; ([String], [String]) <a href="src/Text.Pandoc.Util.Filter.html#classToRevealAttr" class="link">Source</a> <a href="#v:classToRevealAttr" class="selflink">#</a></p><div class="doc"><p>revealjs has some special attributes that has to be
passed to the html, but Pandoc only allows
<code>key=value</code>-attributes, so we have to abuse
<code>.class</code> to rewrite them.</p><p>This is a wrapper-function which just splits the list
into real classes and <code><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a></code></p></div></div><div class="top"><p class="src"><a id="v:toHtml" class="def">toHtml</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Inline">Inline</a> <a href="src/Text.Pandoc.Util.Filter.html#toHtml" class="link">Source</a> <a href="#v:toHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>RawInline (Format &quot;html&quot;)</code>
into real classes and <code><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">revealjsSpecialAttrs</a></code></p></div></div><div class="top"><p class="src"><a id="v:toHtml" class="def">toHtml</a> :: String -&gt; Inline <a href="src/Text.Pandoc.Util.Filter.html#toHtml" class="link">Source</a> <a href="#v:toHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>RawInline (Format &quot;html&quot;)</code>
as this is less line-noise in the filters and the
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:toBlockHtml" class="def">toBlockHtml</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Block">Block</a> <a href="src/Text.Pandoc.Util.Filter.html#toBlockHtml" class="link">Source</a> <a href="#v:toBlockHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>Raw (Format &quot;html&quot;)</code>
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:toBlockHtml" class="def">toBlockHtml</a> :: String -&gt; Block <a href="src/Text.Pandoc.Util.Filter.html#toBlockHtml" class="link">Source</a> <a href="#v:toBlockHtml" class="selflink">#</a></p><div class="doc"><p>small wrapper around <code>Raw (Format &quot;html&quot;)</code>
as this is less line-noise in the filters and the
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:addToAtt" class="def">addToAtt</a> :: <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; [a] <a href="src/Text.Pandoc.Util.Filter.html#addToAtt" class="link">Source</a> <a href="#v:addToAtt" class="selflink">#</a></p><div class="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><div class="top"><p class="src"><a id="v:addToStyle" class="def">addToStyle</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; [(<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)] -&gt; [(<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)] <a href="src/Text.Pandoc.Util.Filter.html#addToStyle" class="link">Source</a> <a href="#v:addToStyle" class="selflink">#</a></p><div class="doc"><p>adds given String to List of key-value-pairs (like in <code><a href="../pandoc-types-1.17.0.5/Text-Pandoc-Definition.html#t:Attr">Attr</a></code>)
intent is more clear.</p></div></div><div class="top"><p class="src"><a id="v:addToAtt" class="def">addToAtt</a> :: Eq a =&gt; a -&gt; [a] -&gt; [a] <a href="src/Text.Pandoc.Util.Filter.html#addToAtt" class="link">Source</a> <a href="#v:addToAtt" class="selflink">#</a></p><div class="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><div class="top"><p class="src"><a id="v:addToStyle" class="def">addToStyle</a> :: String -&gt; [(String, String)] -&gt; [(String, String)] <a href="src/Text.Pandoc.Util.Filter.html#addToStyle" class="link">Source</a> <a href="#v:addToStyle" class="selflink">#</a></p><div class="doc"><p>adds given String to List of key-value-pairs (like in <code>Attr</code>)
in the &quot;style&quot;-Key.</p><p>Useful when trying to add CSS-styles directly to (generated) elements</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>pandoc-slide-filter-0.1.0.0 (Index)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="index"><p class="caption">Index</p><table><tr><td class="src">addToAtt</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:addToAtt">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">addToStyle</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:addToStyle">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">attToString</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:attToString">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">classToRevealAttr</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">cols</td><td class="module"><a href="Text-Pandoc-Util-Filter-Cols.html#v:cols">Text.Pandoc.Util.Filter.Cols</a></td></tr><tr><td class="src">inlineStyling</td><td class="module"><a href="Text-Pandoc-Util-Filter-Styling.html#v:inlineStyling">Text.Pandoc.Util.Filter.Styling</a></td></tr><tr><td class="src">media</td><td class="module"><a href="Text-Pandoc-Util-Filter-Media.html#v:media">Text.Pandoc.Util.Filter.Media</a></td></tr><tr><td class="src">quiz</td><td class="module"><a href="Text-Pandoc-Util-Filter-Quiz.html#v:quiz">Text.Pandoc.Util.Filter.Quiz</a></td></tr><tr><td class="src">revealjsSpecialAttrs</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">styling</td><td class="module"><a href="Text-Pandoc-Util-Filter-Styling.html#v:styling">Text.Pandoc.Util.Filter.Styling</a></td></tr><tr><td class="src">toBlockHtml</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:toBlockHtml">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">toHtml</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:toHtml">Text.Pandoc.Util.Filter</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pandoc-slide-filter-0.1.0.0</p></div><div id="content"><div id="index"><p class="caption">Index</p><table><tr><td class="src">addToAtt</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:addToAtt">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">addToStyle</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:addToStyle">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">attToString</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:attToString">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">classToRevealAttr</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">cols</td><td class="module"><a href="Text-Pandoc-Util-Filter-Cols.html#v:cols">Text.Pandoc.Util.Filter.Cols</a></td></tr><tr><td class="src">convertToStyle</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:convertToStyle">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">inlineStyling</td><td class="module"><a href="Text-Pandoc-Util-Filter-Styling.html#v:inlineStyling">Text.Pandoc.Util.Filter.Styling</a></td></tr><tr><td class="src">media</td><td class="module"><a href="Text-Pandoc-Util-Filter-Media.html#v:media">Text.Pandoc.Util.Filter.Media</a></td></tr><tr><td class="src">quiz</td><td class="module"><a href="Text-Pandoc-Util-Filter-Quiz.html#v:quiz">Text.Pandoc.Util.Filter.Quiz</a></td></tr><tr><td class="src">revealjsRewriteAttr</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:revealjsRewriteAttr">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">revealjsSpecialAttrs</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">styling</td><td class="module"><a href="Text-Pandoc-Util-Filter-Styling.html#v:styling">Text.Pandoc.Util.Filter.Styling</a></td></tr><tr><td class="src">toBlockHtml</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:toBlockHtml">Text.Pandoc.Util.Filter</a></td></tr><tr><td class="src">toHtml</td><td class="module"><a href="Text-Pandoc-Util-Filter.html#v:toHtml">Text.Pandoc.Util.Filter</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.Pandoc.Util.Filter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body id="mini"><div id="module-header"><p class="caption">Text.Pandoc.Util.Filter</p></div><div id="interface"><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:attToString" target="main">attToString</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs" target="main">revealjsSpecialAttrs</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr" target="main">classToRevealAttr</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:toHtml" target="main">toHtml</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:toBlockHtml" target="main">toBlockHtml</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:addToAtt" target="main">addToAtt</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:addToStyle" target="main">addToStyle</a></p></div></div></body></html>
</script></head><body id="mini"><div id="module-header"><p class="caption">Text.Pandoc.Util.Filter</p></div><div id="interface"><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:attToString" target="main">attToString</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:convertToStyle" target="main">convertToStyle</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:revealjsSpecialAttrs" target="main">revealjsSpecialAttrs</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:revealjsRewriteAttr" target="main">revealjsRewriteAttr</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:classToRevealAttr" target="main">classToRevealAttr</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:toHtml" target="main">toHtml</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:toBlockHtml" target="main">toBlockHtml</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:addToAtt" target="main">addToAtt</a></p></div><div class="top"><p class="src"><a href="Text-Pandoc-Util-Filter.html#v:addToStyle" target="main">addToStyle</a></p></div></div></body></html>

Binary file not shown.

146
doc/pandoc-slide-filter.txt Normal file
View File

@ -0,0 +1,146 @@
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
@package pandoc-slide-filter
@version 0.1.0.0
module Text.Pandoc.Util.Filter.Quiz
quiz :: Block -> [Block]
module Text.Pandoc.Util.Filter
-- | converts Attributes to String for usage in HTML
--
-- Also converts <tt>width=xxx</tt> and <tt>height=xxx</tt> to the
-- corresponding style-attributes
attToString :: Attr -> String
-- | helper function for <a>attToString</a>, but can also be used if you
-- want to extract styles from kv-pair
convertToStyle :: [String] -> [(String, String)] -> [(String, String)]
-- | revealjs has some special attributes that has to be passed to the
-- html, but Pandoc only allows <tt>key=value</tt>-attributes, so we have
-- to abuse <tt>.class</tt> to rewrite them.
--
-- The classes that get rewritten are listed here.
--
-- You probably want <a>classToRevealAttr</a>, as that is a wrapper for
-- splitting the class-attribute
revealjsSpecialAttrs :: [String]
-- | 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
revealjsRewriteAttr :: [String] -> [String]
-- | revealjs has some special attributes that has to be passed to the
-- html, but Pandoc only allows <tt>key=value</tt>-attributes, so we have
-- to abuse <tt>.class</tt> to rewrite them.
--
-- This is a wrapper-function which just splits the list into real
-- classes and <a>revealjsSpecialAttrs</a>
classToRevealAttr :: [String] -> ([String], [String])
-- | small wrapper around <tt>RawInline (Format "html")</tt> as this is
-- less line-noise in the filters and the intent is more clear.
toHtml :: String -> Inline
-- | small wrapper around <tt>Raw (Format "html")</tt> as this is less
-- line-noise in the filters and the intent is more clear.
toBlockHtml :: String -> Block
-- | adds a given String to the list if not in there; Does nothing if the
-- given String is already present.
addToAtt :: Eq a => a -> [a] -> [a]
-- | adds given String to List of key-value-pairs (like in <a>Attr</a>) in
-- the "style"-Key.
--
-- Useful when trying to add CSS-styles directly to (generated) elements
addToStyle :: String -> [(String, String)] -> [(String, String)]
-- | Conversion of lvl-x-headings to x-column-layouts in HTML especially
-- for use in revealjs-slides
module Text.Pandoc.Util.Filter.Cols
-- | This filter makes multi-column-layouts out of lvl-x-headings
--
-- Syntax is
--
-- <pre>
-- ## a b
-- </pre>
--
-- yielding a 2-column-layout with aspects a:b i.e. 1:1 for 50/50-layout
-- or 8:2 for 80/20 layout
--
-- currently works for 2 and 3-columns, but extension is
-- straight-forward.
--
-- If you need multiple Block-Elements inside one column, just wrap them
-- with a <tt>&lt;div&gt;</tt>:
--
-- <pre>
-- ## 2 5
--
-- &lt;div&gt;
-- multiple things
-- ```
-- foo
-- ```
--
-- &lt;/div&gt;
--
-- second column here with only 1 element.
-- </pre>
cols :: [Block] -> [Block]
module Text.Pandoc.Util.Filter.Media
-- | main media-plugin.
--
-- Will convert the following syntax
--
-- <pre>
-- ![](foo.aac){#audio}
-- ![](foo.mp4){#video}
-- ![](foo.png){#img}
-- ![](foo.svg){#svg}
-- ![](foo.html){#demo}
-- </pre>
--
-- HTML-id's maybe ommitted if the file-extension is in whitelist.
--
-- If a type is detected by extension a custom id (not matching the
-- extension) will be preserved.
media :: Inline -> IO [Inline]
module Text.Pandoc.Util.Filter.Styling
-- | Block-Styling
--
-- Special cases captured:
--
-- <ul>
-- <li>#col turns a div into a floating-div for multiple columns</li>
-- <li>CodeBlock gets attributes <tt>data-trim</tt> and
-- <tt>data-noescape</tt> automatically</li>
-- <li>.fragment and .frame work properly on divs</li>
-- </ul>
styling :: Block -> IO [Block]
-- | Inline-Styling
--
-- Special cases captured:
--
-- <ul>
-- <li>.fragment and .frame work properly on spans</li>
-- <li>.vspace inside span adds a vertical space with
-- <tt>height=xxx</tt></li>
-- <li>.hspace inside span adds a horizontal space with
-- <tt>width=xxx</tt></li>
-- </ul>
inlineStyling :: Inline -> Inline

View File

@ -42,37 +42,37 @@
</span><a name="line-42"></a><span class="hs-comment">-- second column here with only 1 element.</span><span>
</span><a name="line-43"></a><span class="hs-comment">-- @</span><span>
</span><a name="line-44"></a><span class="hs-identifier">cols</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Block</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Block</span><span class="hs-special">]</span><span>
</span><a name="line-45"></a><a name="cols"><a href="Text.Pandoc.Util.Filter.Cols.html#cols"><span class="hs-identifier">cols</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Header</span><span> </span><span class="hs-number">2</span><span> </span><a name="local-6989586621679076570"><a href="#local-6989586621679076570"><span class="hs-identifier">attr</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679076571"><a href="#local-6989586621679076571"><span class="hs-identifier">wa</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679076572"><a href="#local-6989586621679076572"><span class="hs-identifier">wb</span></a></a><span class="hs-special">]</span><span class="hs-glyph">:</span><a name="local-6989586621679076573"><a href="#local-6989586621679076573"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679076574"><a href="#local-6989586621679076574"><span class="hs-identifier">b</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679076575"><a href="#local-6989586621679076575"><span class="hs-identifier">rest</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><a name="line-46"></a><span> </span><a href="#local-6989586621679076581"><span class="hs-identifier hs-var">outerDiv</span></a><span class="hs-glyph">:</span><a href="#local-6989586621679076575"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-45"></a><a name="cols"><a href="Text.Pandoc.Util.Filter.Cols.html#cols"><span class="hs-identifier">cols</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Header</span><span> </span><span class="hs-number">2</span><span> </span><a name="local-6989586621679064796"><a href="#local-6989586621679064796"><span class="hs-identifier">attr</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679064797"><a href="#local-6989586621679064797"><span class="hs-identifier">wa</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679064798"><a href="#local-6989586621679064798"><span class="hs-identifier">wb</span></a></a><span class="hs-special">]</span><span class="hs-glyph">:</span><a name="local-6989586621679064799"><a href="#local-6989586621679064799"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679064800"><a href="#local-6989586621679064800"><span class="hs-identifier">b</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679064801"><a href="#local-6989586621679064801"><span class="hs-identifier">rest</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><a name="line-46"></a><span> </span><a href="#local-6989586621679064807"><span class="hs-identifier hs-var">outerDiv</span></a><span class="hs-glyph">:</span><a href="#local-6989586621679064801"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-47"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-48"></a><span> </span><a name="local-6989586621679076576"><a href="#local-6989586621679076576"><span class="hs-identifier">wa'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679076571"><span class="hs-identifier hs-var">wa</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-49"></a><span> </span><a name="local-6989586621679076577"><a href="#local-6989586621679076577"><span class="hs-identifier">wb'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679076572"><span class="hs-identifier hs-var">wb</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-50"></a><span> </span><a name="local-6989586621679076578"><a href="#local-6989586621679076578"><span class="hs-identifier">total</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679076576"><span class="hs-identifier hs-var">wa'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679076577"><span class="hs-identifier hs-var">wb'</span></a><span>
</span><a name="line-51"></a><span> </span><a name="local-6989586621679076579"><a href="#local-6989586621679076579"><span class="hs-identifier">pa</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679076576"><span class="hs-identifier hs-var">wa'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679076578"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-52"></a><span> </span><a name="local-6989586621679076580"><a href="#local-6989586621679076580"><span class="hs-identifier">pb</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679076577"><span class="hs-identifier hs-var">wb'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679076578"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-53"></a><span> </span><a name="local-6989586621679076581"><a href="#local-6989586621679076581"><span class="hs-identifier">outerDiv</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679076570"><span class="hs-identifier hs-var">attr</span></a><span> </span><span class="hs-special">[</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679076579"><span class="hs-identifier hs-var">pa</span></a><span> </span><a href="#local-6989586621679076573"><span class="hs-identifier hs-var">a</span></a><span>
</span><a name="line-54"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679076580"><span class="hs-identifier hs-var">pb</span></a><span> </span><a href="#local-6989586621679076574"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-48"></a><span> </span><a name="local-6989586621679064802"><a href="#local-6989586621679064802"><span class="hs-identifier">wa'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679064797"><span class="hs-identifier hs-var">wa</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-49"></a><span> </span><a name="local-6989586621679064803"><a href="#local-6989586621679064803"><span class="hs-identifier">wb'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679064798"><span class="hs-identifier hs-var">wb</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-50"></a><span> </span><a name="local-6989586621679064804"><a href="#local-6989586621679064804"><span class="hs-identifier">total</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679064802"><span class="hs-identifier hs-var">wa'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679064803"><span class="hs-identifier hs-var">wb'</span></a><span>
</span><a name="line-51"></a><span> </span><a name="local-6989586621679064805"><a href="#local-6989586621679064805"><span class="hs-identifier">pa</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679064802"><span class="hs-identifier hs-var">wa'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679064804"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-52"></a><span> </span><a name="local-6989586621679064806"><a href="#local-6989586621679064806"><span class="hs-identifier">pb</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679064803"><span class="hs-identifier hs-var">wb'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679064804"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-53"></a><span> </span><a name="local-6989586621679064807"><a href="#local-6989586621679064807"><span class="hs-identifier">outerDiv</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679064796"><span class="hs-identifier hs-var">attr</span></a><span> </span><span class="hs-special">[</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679064805"><span class="hs-identifier hs-var">pa</span></a><span> </span><a href="#local-6989586621679064799"><span class="hs-identifier hs-var">a</span></a><span>
</span><a name="line-54"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679064806"><span class="hs-identifier hs-var">pb</span></a><span> </span><a href="#local-6989586621679064800"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-55"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#clearDiv"><span class="hs-identifier hs-var">clearDiv</span></a><span>
</span><a name="line-56"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-57"></a><span class="hs-identifier">cols</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Header</span><span> </span><span class="hs-number">3</span><span> </span><a name="local-6989586621679077186"><a href="#local-6989586621679077186"><span class="hs-identifier">attr</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679077187"><a href="#local-6989586621679077187"><span class="hs-identifier">wa</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679077188"><a href="#local-6989586621679077188"><span class="hs-identifier">wb</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679077189"><a href="#local-6989586621679077189"><span class="hs-identifier">wc</span></a></a><span class="hs-special">]</span><span class="hs-glyph">:</span><a name="local-6989586621679077190"><a href="#local-6989586621679077190"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679077191"><a href="#local-6989586621679077191"><span class="hs-identifier">b</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679077192"><a href="#local-6989586621679077192"><span class="hs-identifier">c</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679077193"><a href="#local-6989586621679077193"><span class="hs-identifier">rest</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><a name="line-58"></a><span> </span><a href="#local-6989586621679077201"><span class="hs-identifier hs-var">outerDiv</span></a><span class="hs-glyph">:</span><a href="#local-6989586621679077193"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-57"></a><span class="hs-identifier">cols</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Header</span><span> </span><span class="hs-number">3</span><span> </span><a name="local-6989586621679065453"><a href="#local-6989586621679065453"><span class="hs-identifier">attr</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679065454"><a href="#local-6989586621679065454"><span class="hs-identifier">wa</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679065455"><a href="#local-6989586621679065455"><span class="hs-identifier">wb</span></a></a><span class="hs-special">,</span><span class="hs-identifier hs-var">Space</span><span class="hs-special">,</span><span class="hs-identifier hs-var">Str</span><span> </span><a name="local-6989586621679065456"><a href="#local-6989586621679065456"><span class="hs-identifier">wc</span></a></a><span class="hs-special">]</span><span class="hs-glyph">:</span><a name="local-6989586621679065457"><a href="#local-6989586621679065457"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679065458"><a href="#local-6989586621679065458"><span class="hs-identifier">b</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679065459"><a href="#local-6989586621679065459"><span class="hs-identifier">c</span></a></a><span class="hs-glyph">:</span><a name="local-6989586621679065460"><a href="#local-6989586621679065460"><span class="hs-identifier">rest</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><a name="line-58"></a><span> </span><a href="#local-6989586621679065468"><span class="hs-identifier hs-var">outerDiv</span></a><span class="hs-glyph">:</span><a href="#local-6989586621679065460"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-59"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-60"></a><span> </span><a name="local-6989586621679077194"><a href="#local-6989586621679077194"><span class="hs-identifier">wa'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679077187"><span class="hs-identifier hs-var">wa</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-61"></a><span> </span><a name="local-6989586621679077195"><a href="#local-6989586621679077195"><span class="hs-identifier">wb'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679077188"><span class="hs-identifier hs-var">wb</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-62"></a><span> </span><a name="local-6989586621679077196"><a href="#local-6989586621679077196"><span class="hs-identifier">wc'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679077189"><span class="hs-identifier hs-var">wc</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-63"></a><span> </span><a name="local-6989586621679077197"><a href="#local-6989586621679077197"><span class="hs-identifier">total</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679077194"><span class="hs-identifier hs-var">wa'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679077195"><span class="hs-identifier hs-var">wb'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679077196"><span class="hs-identifier hs-var">wc'</span></a><span>
</span><a name="line-64"></a><span> </span><a name="local-6989586621679077198"><a href="#local-6989586621679077198"><span class="hs-identifier">pa</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679077194"><span class="hs-identifier hs-var">wa'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679077197"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-65"></a><span> </span><a name="local-6989586621679077199"><a href="#local-6989586621679077199"><span class="hs-identifier">pb</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679077195"><span class="hs-identifier hs-var">wb'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679077197"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-66"></a><span> </span><a name="local-6989586621679077200"><a href="#local-6989586621679077200"><span class="hs-identifier">pc</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679077196"><span class="hs-identifier hs-var">wc'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679077197"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-67"></a><span> </span><a name="local-6989586621679077201"><a href="#local-6989586621679077201"><span class="hs-identifier">outerDiv</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679077186"><span class="hs-identifier hs-var">attr</span></a><span> </span><span class="hs-special">[</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679077198"><span class="hs-identifier hs-var">pa</span></a><span> </span><a href="#local-6989586621679077190"><span class="hs-identifier hs-var">a</span></a><span>
</span><a name="line-68"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679077199"><span class="hs-identifier hs-var">pb</span></a><span> </span><a href="#local-6989586621679077191"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-69"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679077200"><span class="hs-identifier hs-var">pc</span></a><span> </span><a href="#local-6989586621679077192"><span class="hs-identifier hs-var">c</span></a><span>
</span><a name="line-60"></a><span> </span><a name="local-6989586621679065461"><a href="#local-6989586621679065461"><span class="hs-identifier">wa'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679065454"><span class="hs-identifier hs-var">wa</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-61"></a><span> </span><a name="local-6989586621679065462"><a href="#local-6989586621679065462"><span class="hs-identifier">wb'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679065455"><span class="hs-identifier hs-var">wb</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-62"></a><span> </span><a name="local-6989586621679065463"><a href="#local-6989586621679065463"><span class="hs-identifier">wc'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fromMaybe</span><span> </span><span class="hs-number">1</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">readMaybe</span><span> </span><a href="#local-6989586621679065456"><span class="hs-identifier hs-var">wc</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span>
</span><a name="line-63"></a><span> </span><a name="local-6989586621679065464"><a href="#local-6989586621679065464"><span class="hs-identifier">total</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679065461"><span class="hs-identifier hs-var">wa'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679065462"><span class="hs-identifier hs-var">wb'</span></a><span> </span><span class="hs-operator hs-var">+</span><span> </span><a href="#local-6989586621679065463"><span class="hs-identifier hs-var">wc'</span></a><span>
</span><a name="line-64"></a><span> </span><a name="local-6989586621679065465"><a href="#local-6989586621679065465"><span class="hs-identifier">pa</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679065461"><span class="hs-identifier hs-var">wa'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679065464"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-65"></a><span> </span><a name="local-6989586621679065466"><a href="#local-6989586621679065466"><span class="hs-identifier">pb</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679065462"><span class="hs-identifier hs-var">wb'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679065464"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-66"></a><span> </span><a name="local-6989586621679065467"><a href="#local-6989586621679065467"><span class="hs-identifier">pc</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-number">100</span><span class="hs-operator hs-var">*</span><a href="#local-6989586621679065463"><span class="hs-identifier hs-var">wc'</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">div</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679065464"><span class="hs-identifier hs-var">total</span></a><span>
</span><a name="line-67"></a><span> </span><a name="local-6989586621679065468"><a href="#local-6989586621679065468"><span class="hs-identifier">outerDiv</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679065453"><span class="hs-identifier hs-var">attr</span></a><span> </span><span class="hs-special">[</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679065465"><span class="hs-identifier hs-var">pa</span></a><span> </span><a href="#local-6989586621679065457"><span class="hs-identifier hs-var">a</span></a><span>
</span><a name="line-68"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679065466"><span class="hs-identifier hs-var">pb</span></a><span> </span><a href="#local-6989586621679065458"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-69"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier hs-var">makeDiv</span></a><span> </span><a href="#local-6989586621679065467"><span class="hs-identifier hs-var">pc</span></a><span> </span><a href="#local-6989586621679065459"><span class="hs-identifier hs-var">c</span></a><span>
</span><a name="line-70"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.Cols.html#clearDiv"><span class="hs-identifier hs-var">clearDiv</span></a><span>
</span><a name="line-71"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-72"></a><span class="hs-identifier">cols</span><span> </span><a name="local-6989586621679077202"><a href="#local-6989586621679077202"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679077202"><span class="hs-identifier hs-var">x</span></a><span>
</span><a name="line-72"></a><span class="hs-identifier">cols</span><span> </span><a name="local-6989586621679065469"><a href="#local-6989586621679065469"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679065469"><span class="hs-identifier hs-var">x</span></a><span>
</span><a name="line-73"></a><span>
</span><a name="line-74"></a><span class="hs-identifier">makeDiv</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Int</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Block</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Block</span><span>
</span><a name="line-75"></a><a name="makeDiv"><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier">makeDiv</span></a></a><span> </span><a name="local-6989586621679077203"><a href="#local-6989586621679077203"><span class="hs-identifier">width</span></a></a><span> </span><a name="local-6989586621679077204"><a href="#local-6989586621679077204"><span class="hs-identifier">content</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;width:&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679077203"><span class="hs-identifier hs-var">width</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;%;float:left&quot;</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679077204"><span class="hs-identifier hs-var">content</span></a><span class="hs-special">]</span><span>
</span><a name="line-75"></a><a name="makeDiv"><a href="Text.Pandoc.Util.Filter.Cols.html#makeDiv"><span class="hs-identifier">makeDiv</span></a></a><span> </span><a name="local-6989586621679065470"><a href="#local-6989586621679065470"><span class="hs-identifier">width</span></a></a><span> </span><a name="local-6989586621679065471"><a href="#local-6989586621679065471"><span class="hs-identifier">content</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;width:&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679065470"><span class="hs-identifier hs-var">width</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;%;float:left&quot;</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679065471"><span class="hs-identifier hs-var">content</span></a><span class="hs-special">]</span><span>
</span><a name="line-76"></a><span>
</span><a name="line-77"></a><span class="hs-identifier">clearDiv</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Block</span><span>
</span><a name="line-78"></a><a name="clearDiv"><a href="Text.Pandoc.Util.Filter.Cols.html#clearDiv"><span class="hs-identifier">clearDiv</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;clear: both&quot;</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-string">&quot;&amp;nbsp;&quot;</span><span class="hs-special">]</span><span class="hs-special">]</span><span>

View File

@ -4,156 +4,164 @@
</span><a name="line-4"></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#media"><span class="hs-identifier hs-var">media</span></a><span class="hs-special">)</span><span>
</span><a name="line-5"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-6"></a><span>
</span><a name="line-7"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">JSON</span><span>
</span><a name="line-8"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control</span><span class="hs-operator">.</span><span class="hs-identifier">Exception</span><span>
</span><a name="line-9"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Monoid</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">&lt;&gt;</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-10"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Char</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">toLower</span><span class="hs-special">)</span><span>
</span><a name="line-7"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control</span><span class="hs-operator">.</span><span class="hs-identifier">Exception</span><span>
</span><a name="line-8"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Char</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">toLower</span><span class="hs-special">)</span><span>
</span><a name="line-9"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">List</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">intercalate</span><span class="hs-special">)</span><span>
</span><a name="line-10"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Monoid</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">&lt;&gt;</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-11"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">System</span><span class="hs-operator">.</span><span class="hs-identifier">FilePath</span><span>
</span><a name="line-12"></a><span>
</span><a name="line-13"></a><span class="hs-keyword">import</span><span> </span><a href="Text.Pandoc.Util.Filter.html"><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">Util</span><span class="hs-operator">.</span><span class="hs-identifier">Filter</span></a><span>
</span><a name="line-14"></a><span>
</span><a name="line-15"></a><span class="hs-pragma">{-# ANN module &quot;HLint: ignore Redundant $&quot; #-}</span><span> </span><span class="hs-comment">-- supress HLint-Warnings about $</span><span>
</span><a name="line-16"></a><span>
</span><a name="line-17"></a><span class="hs-comment">-- | File-extensions that should be treated as audio</span><span>
</span><a name="line-18"></a><span class="hs-identifier">audioExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-19"></a><a name="audioExt"><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier">audioExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;mp3&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;aac&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-20"></a><span>
</span><a name="line-21"></a><span class="hs-comment">-- | File-extensions that should be treated as video</span><span>
</span><a name="line-22"></a><span class="hs-identifier">videoExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-23"></a><a name="videoExt"><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier">videoExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;avi&quot;</span><span>
</span><a name="line-24"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;mp4&quot;</span><span>
</span><a name="line-25"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;mov&quot;</span><span>
</span><a name="line-26"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-27"></a><span>
</span><a name="line-28"></a><span class="hs-comment">-- | File-extensions that should be treated as image</span><span>
</span><a name="line-29"></a><span class="hs-identifier">imgExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-30"></a><a name="imgExt"><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier">imgExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span>
</span><a name="line-31"></a><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;jpg&quot;</span><span>
</span><a name="line-32"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;jpeg&quot;</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;png&quot;</span><span>
</span><a name="line-34"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;gif&quot;</span><span>
</span><a name="line-35"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;tif&quot;</span><span>
</span><a name="line-36"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;tiff&quot;</span><span>
</span><a name="line-37"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;bmp&quot;</span><span>
</span><a name="line-38"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-39"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-40"></a><span>
</span><a name="line-41"></a><span class="hs-comment">-- | File-extensions that should be treated as demo and will be included</span><span>
</span><a name="line-42"></a><span class="hs-comment">-- in an iframe</span><span>
</span><a name="line-43"></a><span class="hs-identifier">demoExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-44"></a><a name="demoExt"><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier">demoExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;htm&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-45"></a><span>
</span><a name="line-46"></a><span class="hs-comment">-- | main media-plugin.</span><span>
</span><a name="line-47"></a><span class="hs-comment">--</span><span>
</span><a name="line-48"></a><span class="hs-comment">-- Will convert the following syntax</span><span>
</span><a name="line-49"></a><span class="hs-comment">--</span><span>
</span><a name="line-50"></a><span class="hs-comment">-- @</span><span>
</span><a name="line-51"></a><span class="hs-comment">-- ![](foo.aac){#audio}</span><span>
</span><a name="line-52"></a><span class="hs-comment">-- ![](foo.mp4){#video}</span><span>
</span><a name="line-53"></a><span class="hs-comment">-- ![](foo.png){#img}</span><span>
</span><a name="line-54"></a><span class="hs-comment">-- ![](foo.svg){#svg}</span><span>
</span><a name="line-55"></a><span class="hs-comment">-- ![](foo.html){#demo}</span><span>
</span><a name="line-56"></a><span class="hs-comment">-- @</span><span>
</span><a name="line-57"></a><span class="hs-comment">--</span><span>
</span><a name="line-58"></a><span class="hs-comment">-- HTML-id's maybe ommitted if the file-extension is in whitelist.</span><span>
</span><a name="line-59"></a><span class="hs-comment">--</span><span>
</span><a name="line-60"></a><span class="hs-comment">-- If a type is detected by extension a custom id (not matching the extension)</span><span>
</span><a name="line-61"></a><span class="hs-comment">-- will be preserved.</span><span>
</span><a name="line-62"></a><span class="hs-comment">--</span><span>
</span><a name="line-63"></a><span class="hs-identifier">media</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Inline</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">IO</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span>
</span><a name="line-64"></a><span class="hs-comment">--audio</span><span>
</span><a name="line-65"></a><a name="media"><a href="Text.Pandoc.Util.Filter.Media.html#media"><span class="hs-identifier">media</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079177"><a href="#local-6989586621679079177"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679079178"><a href="#local-6989586621679079178"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679079179"><a href="#local-6989586621679079179"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079180"><a href="#local-6989586621679079180"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-66"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079177"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079180"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier hs-var">audioExt</span></a><span>
</span><a name="line-67"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;audio &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079181"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079180"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><a href="#local-6989586621679079177"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079182"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079179"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/audio&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-68"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-69"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079181"><a href="#local-6989586621679079181"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079182"><a href="#local-6989586621679079182"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079178"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-70"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079183"><a href="#local-6989586621679079183"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679079184"><a href="#local-6989586621679079184"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679079185"><a href="#local-6989586621679079185"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679079186"><a href="#local-6989586621679079186"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079187"><a href="#local-6989586621679079187"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-71"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079183"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079187"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier hs-var">audioExt</span></a><span>
</span><a name="line-72"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure&gt;&lt;audio &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079188"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079187"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><a href="#local-6989586621679079183"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079189"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079185"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/audio&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-73"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-74"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079186"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-75"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-76"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-77"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079188"><a href="#local-6989586621679079188"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079189"><a href="#local-6989586621679079189"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079184"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-78"></a><span class="hs-comment">--videos</span><span>
</span><a name="line-79"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079190"><a href="#local-6989586621679079190"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079191"><a href="#local-6989586621679079191"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079192"><a href="#local-6989586621679079192"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079193"><a href="#local-6989586621679079193"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-80"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079190"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079193"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier hs-var">videoExt</span></a><span>
</span><a name="line-81"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;video &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079194"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079193"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><a href="#local-6989586621679079190"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079195"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079192"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/video&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-82"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-83"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079194"><a href="#local-6989586621679079194"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079195"><a href="#local-6989586621679079195"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079191"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-84"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079196"><a href="#local-6989586621679079196"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079197"><a href="#local-6989586621679079197"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079198"><a href="#local-6989586621679079198"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679079199"><a href="#local-6989586621679079199"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079200"><a href="#local-6989586621679079200"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-85"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079196"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079200"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier hs-var">videoExt</span></a><span>
</span><a name="line-86"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-87"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;video &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079201"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079200"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><a href="#local-6989586621679079196"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079202"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079198"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/video&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-88"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-89"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079199"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-90"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-91"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-92"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079201"><a href="#local-6989586621679079201"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079202"><a href="#local-6989586621679079202"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079197"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-93"></a><span class="hs-comment">--images</span><span>
</span><a name="line-94"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079203"><a href="#local-6989586621679079203"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079204"><a href="#local-6989586621679079204"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079205"><a href="#local-6989586621679079205"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079206"><a href="#local-6989586621679079206"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-95"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079203"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079206"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier hs-var">imgExt</span></a><span>
</span><a name="line-96"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-97"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;img &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079207"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079206"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><a href="#local-6989586621679079203"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079208"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079205"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/img&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-98"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-99"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-100"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079207"><a href="#local-6989586621679079207"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079208"><a href="#local-6989586621679079208"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079204"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-101"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079209"><a href="#local-6989586621679079209"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079210"><a href="#local-6989586621679079210"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079211"><a href="#local-6989586621679079211"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679079212"><a href="#local-6989586621679079212"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079213"><a href="#local-6989586621679079213"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-102"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079209"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079213"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier hs-var">imgExt</span></a><span>
</span><a name="line-103"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-104"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;img &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079214"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079213"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><a href="#local-6989586621679079209"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679079215"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679079211"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/img&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-105"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-106"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079212"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-107"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-108"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-109"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079214"><a href="#local-6989586621679079214"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079215"><a href="#local-6989586621679079215"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079210"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-110"></a><span class="hs-comment">--load svg and dump it in</span><span>
</span><a name="line-111"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079216"><a href="#local-6989586621679079216"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079217"><a href="#local-6989586621679079217"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079218"><a href="#local-6989586621679079218"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079219"><a href="#local-6989586621679079219"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-112"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079216"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-113"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">handle</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679079549"><a href="#local-6989586621679079549"><span class="hs-identifier">fileerror</span></a></a><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">IOException</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;Could not read file: &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079219"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&lt;br /&gt;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679079549"><span class="hs-identifier hs-var">fileerror</span></a><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">$</span><span>
</span><a name="line-114"></a><span> </span><span class="hs-keyword">do</span><span>
</span><a name="line-115"></a><span> </span><a name="local-6989586621679079690"><a href="#local-6989586621679079690"><span class="hs-identifier">svg</span></a></a><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier hs-var">readFile</span><span> </span><a href="#local-6989586621679079219"><span class="hs-identifier hs-var">filename</span></a><span>
</span><a name="line-116"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079220"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;svg&quot;</span><span> </span><a href="#local-6989586621679079216"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079221"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079218"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- use attributes on figure, as svg gets dumped in..</span><span>
</span><a name="line-117"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679079690"><span class="hs-identifier hs-var">svg</span></a><span class="hs-special">]</span><span>
</span><a name="line-118"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-119"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-120"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079220"><a href="#local-6989586621679079220"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079221"><a href="#local-6989586621679079221"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079217"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-121"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079691"><a href="#local-6989586621679079691"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079692"><a href="#local-6989586621679079692"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079693"><a href="#local-6989586621679079693"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679079694"><a href="#local-6989586621679079694"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079695"><a href="#local-6989586621679079695"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-122"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079691"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-123"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">handle</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679079698"><a href="#local-6989586621679079698"><span class="hs-identifier">fileerror</span></a></a><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">IOException</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;Could not read file: &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079695"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&lt;br /&gt;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679079698"><span class="hs-identifier hs-var">fileerror</span></a><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">$</span><span>
</span><a name="line-124"></a><span> </span><span class="hs-keyword">do</span><span>
</span><a name="line-125"></a><span> </span><a name="local-6989586621679079699"><a href="#local-6989586621679079699"><span class="hs-identifier">svg</span></a></a><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier hs-var">readFile</span><span> </span><a href="#local-6989586621679079695"><span class="hs-identifier hs-var">filename</span></a><span>
</span><a name="line-126"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079696"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;svg&quot;</span><span> </span><a href="#local-6989586621679079691"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079697"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079693"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- use attributes on figure, as svg gets dumped in..</span><span>
</span><a name="line-127"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679079699"><span class="hs-identifier hs-var">svg</span></a><span class="hs-special">]</span><span>
</span><a name="line-128"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-129"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079694"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-130"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-131"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-132"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079696"><a href="#local-6989586621679079696"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079697"><a href="#local-6989586621679079697"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079692"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-133"></a><span class="hs-comment">--html-demos etc. as IFrames</span><span>
</span><a name="line-134"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079700"><a href="#local-6989586621679079700"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079701"><a href="#local-6989586621679079701"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079702"><a href="#local-6989586621679079702"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079703"><a href="#local-6989586621679079703"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-135"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079700"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079703"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier hs-var">demoExt</span></a><span>
</span><a name="line-136"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;iframe &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079704"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079703"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;?plugin\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><a href="#local-6989586621679079700"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079705"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079702"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/iframe&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-137"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-138"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079704"><a href="#local-6989586621679079704"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079705"><a href="#local-6989586621679079705"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079701"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-139"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679079706"><a href="#local-6989586621679079706"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079707"><a href="#local-6989586621679079707"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079708"><a href="#local-6989586621679079708"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679079709"><a href="#local-6989586621679079709"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079710"><a href="#local-6989586621679079710"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-140"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679079706"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679079710"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier hs-var">demoExt</span></a><span>
</span><a name="line-141"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-142"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;iframe &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679079711"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079710"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;?plugin\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><a href="#local-6989586621679079706"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079712"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679079708"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/iframe&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-143"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-144"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679079709"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-145"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-146"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-147"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679079711"><a href="#local-6989586621679079711"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679079712"><a href="#local-6989586621679079712"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679079707"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-148"></a><span class="hs-comment">-- if not matched</span><span>
</span><a name="line-149"></a><span class="hs-identifier">media</span><span> </span><a name="local-6989586621679079713"><a href="#local-6989586621679079713"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679079713"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-150"></a><span>
</span><a name="line-151"></a><span class="hs-identifier">checkExtension</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Bool</span><span>
</span><a name="line-152"></a><a name="checkExtension"><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier">checkExtension</span></a></a><span> </span><a name="local-6989586621679079714"><a href="#local-6989586621679079714"><span class="hs-identifier">fn</span></a></a><span> </span><a name="local-6989586621679079715"><a href="#local-6989586621679079715"><span class="hs-identifier">exts</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">fmap</span><span> </span><span class="hs-identifier hs-var">toLower</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">tail</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">takeExtension</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679079714"><span class="hs-identifier hs-var">fn</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679079715"><span class="hs-identifier hs-var">exts</span></a><span>
</span><a name="line-153"></a><span>
</span><a name="line-154"></a><span class="hs-identifier">idFilter</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-155"></a><a name="idFilter"><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier">idFilter</span></a></a><span> </span><a name="local-6989586621679080112"><a href="#local-6989586621679080112"><span class="hs-identifier">a</span></a></a><span> </span><a name="local-6989586621679080113"><a href="#local-6989586621679080113"><span class="hs-identifier">b</span></a></a><span>
</span><a name="line-156"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679080112"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><a href="#local-6989586621679080113"><span class="hs-identifier hs-var">b</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><a name="line-157"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679080113"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-158"></a><span>
</span><a name="line-159"></a></pre></body></html>
</span><a name="line-12"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">JSON</span><span>
</span><a name="line-13"></a><span>
</span><a name="line-14"></a><span class="hs-keyword">import</span><span> </span><a href="Text.Pandoc.Util.Filter.html"><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">Util</span><span class="hs-operator">.</span><span class="hs-identifier">Filter</span></a><span>
</span><a name="line-15"></a><span>
</span><a name="line-16"></a><span class="hs-pragma">{-# ANN module &quot;HLint: ignore Redundant $&quot; #-}</span><span> </span><span class="hs-comment">-- supress HLint-Warnings about $</span><span>
</span><a name="line-17"></a><span>
</span><a name="line-18"></a><span class="hs-comment">-- | File-extensions that should be treated as audio</span><span>
</span><a name="line-19"></a><span class="hs-identifier">audioExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-20"></a><a name="audioExt"><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier">audioExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;mp3&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;aac&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-21"></a><span>
</span><a name="line-22"></a><span class="hs-comment">-- | File-extensions that should be treated as video</span><span>
</span><a name="line-23"></a><span class="hs-identifier">videoExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-24"></a><a name="videoExt"><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier">videoExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;avi&quot;</span><span>
</span><a name="line-25"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;mp4&quot;</span><span>
</span><a name="line-26"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;mov&quot;</span><span>
</span><a name="line-27"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-28"></a><span>
</span><a name="line-29"></a><span class="hs-comment">-- | File-extensions that should be treated as image</span><span>
</span><a name="line-30"></a><span class="hs-identifier">imgExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-31"></a><a name="imgExt"><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier">imgExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span>
</span><a name="line-32"></a><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;jpg&quot;</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;jpeg&quot;</span><span>
</span><a name="line-34"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;png&quot;</span><span>
</span><a name="line-35"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;gif&quot;</span><span>
</span><a name="line-36"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;tif&quot;</span><span>
</span><a name="line-37"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;tiff&quot;</span><span>
</span><a name="line-38"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;bmp&quot;</span><span>
</span><a name="line-39"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-40"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-41"></a><span>
</span><a name="line-42"></a><span class="hs-comment">-- | File-extensions that should be treated as demo and will be included</span><span>
</span><a name="line-43"></a><span class="hs-comment">-- in an iframe</span><span>
</span><a name="line-44"></a><span class="hs-identifier">demoExt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-45"></a><a name="demoExt"><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier">demoExt</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;htm&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-46"></a><span>
</span><a name="line-47"></a><span class="hs-comment">-- | main media-plugin.</span><span>
</span><a name="line-48"></a><span class="hs-comment">--</span><span>
</span><a name="line-49"></a><span class="hs-comment">-- Will convert the following syntax</span><span>
</span><a name="line-50"></a><span class="hs-comment">--</span><span>
</span><a name="line-51"></a><span class="hs-comment">-- @</span><span>
</span><a name="line-52"></a><span class="hs-comment">-- ![](foo.aac){#audio}</span><span>
</span><a name="line-53"></a><span class="hs-comment">-- ![](foo.mp4){#video}</span><span>
</span><a name="line-54"></a><span class="hs-comment">-- ![](foo.png){#img}</span><span>
</span><a name="line-55"></a><span class="hs-comment">-- ![](foo.svg){#svg}</span><span>
</span><a name="line-56"></a><span class="hs-comment">-- ![](foo.html){#demo}</span><span>
</span><a name="line-57"></a><span class="hs-comment">-- @</span><span>
</span><a name="line-58"></a><span class="hs-comment">--</span><span>
</span><a name="line-59"></a><span class="hs-comment">-- HTML-id's maybe ommitted if the file-extension is in whitelist.</span><span>
</span><a name="line-60"></a><span class="hs-comment">--</span><span>
</span><a name="line-61"></a><span class="hs-comment">-- If a type is detected by extension a custom id (not matching the extension)</span><span>
</span><a name="line-62"></a><span class="hs-comment">-- will be preserved.</span><span>
</span><a name="line-63"></a><span class="hs-comment">--</span><span>
</span><a name="line-64"></a><span class="hs-identifier">media</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Inline</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">IO</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span>
</span><a name="line-65"></a><span class="hs-comment">--audio</span><span>
</span><a name="line-66"></a><a name="media"><a href="Text.Pandoc.Util.Filter.Media.html#media"><span class="hs-identifier">media</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067842"><a href="#local-6989586621679067842"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679067843"><a href="#local-6989586621679067843"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679067844"><a href="#local-6989586621679067844"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067845"><a href="#local-6989586621679067845"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-67"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679067842"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679067845"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier hs-var">audioExt</span></a><span>
</span><a name="line-68"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;audio &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679067846"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067845"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><a href="#local-6989586621679067842"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679067847"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679067844"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/audio&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-69"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-70"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067846"><a href="#local-6989586621679067846"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067847"><a href="#local-6989586621679067847"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679067843"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-71"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067848"><a href="#local-6989586621679067848"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679067849"><a href="#local-6989586621679067849"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679067850"><a href="#local-6989586621679067850"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679067851"><a href="#local-6989586621679067851"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067852"><a href="#local-6989586621679067852"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-72"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679067848"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679067852"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#audioExt"><span class="hs-identifier hs-var">audioExt</span></a><span>
</span><a name="line-73"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;audio&quot;</span><span> </span><a href="#local-6989586621679067848"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679067854"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679067850"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;audio &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679067853"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067852"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&gt;&lt;/audio&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-74"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-75"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067851"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-76"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-77"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-78"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067853"><a href="#local-6989586621679067853"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067854"><a href="#local-6989586621679067854"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679067849"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-79"></a><span class="hs-comment">--videos</span><span>
</span><a name="line-80"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067855"><a href="#local-6989586621679067855"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067856"><a href="#local-6989586621679067856"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067857"><a href="#local-6989586621679067857"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067858"><a href="#local-6989586621679067858"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-81"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679067855"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679067858"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier hs-var">videoExt</span></a><span>
</span><a name="line-82"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;video &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679067859"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067858"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><a href="#local-6989586621679067855"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679067860"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679067857"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/video&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-83"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-84"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067859"><a href="#local-6989586621679067859"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067860"><a href="#local-6989586621679067860"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679067856"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-85"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067861"><a href="#local-6989586621679067861"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067862"><a href="#local-6989586621679067862"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067863"><a href="#local-6989586621679067863"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679067864"><a href="#local-6989586621679067864"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067865"><a href="#local-6989586621679067865"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-86"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679067861"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679067865"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#videoExt"><span class="hs-identifier hs-var">videoExt</span></a><span>
</span><a name="line-87"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;video&quot;</span><span> </span><a href="#local-6989586621679067861"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679067867"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679067863"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-88"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;video &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679067866"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067865"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; style=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067868"><span class="hs-identifier hs-var">style</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&gt;&lt;/video&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-89"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-90"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067864"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-91"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-92"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-93"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067866"><a href="#local-6989586621679067866"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067867"><a href="#local-6989586621679067867"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679067862"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-94"></a><span> </span><a name="local-6989586621679067868"><a href="#local-6989586621679067868"><span class="hs-identifier">style</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#filterStyle"><span class="hs-identifier hs-var">filterStyle</span></a><span> </span><a href="#local-6989586621679067863"><span class="hs-identifier hs-var">att'</span></a><span>
</span><a name="line-95"></a><span class="hs-comment">--load svg and dump it in</span><span>
</span><a name="line-96"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067869"><a href="#local-6989586621679067869"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067870"><a href="#local-6989586621679067870"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067871"><a href="#local-6989586621679067871"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679067872"><a href="#local-6989586621679067872"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-97"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679067869"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-98"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">handle</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679068220"><a href="#local-6989586621679068220"><span class="hs-identifier">fileerror</span></a></a><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">IOException</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;Could not read file: &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679067872"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&lt;br /&gt;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679068220"><span class="hs-identifier hs-var">fileerror</span></a><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">$</span><span>
</span><a name="line-99"></a><span> </span><span class="hs-keyword">do</span><span>
</span><a name="line-100"></a><span> </span><a name="local-6989586621679068456"><a href="#local-6989586621679068456"><span class="hs-identifier">svg</span></a></a><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier hs-var">readFile</span><span> </span><a href="#local-6989586621679067872"><span class="hs-identifier hs-var">filename</span></a><span>
</span><a name="line-101"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679067873"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;svg&quot;</span><span> </span><a href="#local-6989586621679067869"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679067874"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679067871"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- use attributes on figure, as svg gets dumped in..</span><span>
</span><a name="line-102"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679068456"><span class="hs-identifier hs-var">svg</span></a><span class="hs-special">]</span><span>
</span><a name="line-103"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-104"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-105"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679067873"><a href="#local-6989586621679067873"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679067874"><a href="#local-6989586621679067874"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679067870"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-106"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068457"><a href="#local-6989586621679068457"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068458"><a href="#local-6989586621679068458"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068459"><a href="#local-6989586621679068459"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679068460"><a href="#local-6989586621679068460"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068461"><a href="#local-6989586621679068461"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-107"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068457"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;svg&quot;</span><span>
</span><a name="line-108"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">handle</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679068464"><a href="#local-6989586621679068464"><span class="hs-identifier">fileerror</span></a></a><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">IOException</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;Could not read file: &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068461"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&lt;br /&gt;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679068464"><span class="hs-identifier hs-var">fileerror</span></a><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">$</span><span>
</span><a name="line-109"></a><span> </span><span class="hs-keyword">do</span><span>
</span><a name="line-110"></a><span> </span><a name="local-6989586621679068465"><a href="#local-6989586621679068465"><span class="hs-identifier">svg</span></a></a><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier hs-var">readFile</span><span> </span><a href="#local-6989586621679068461"><span class="hs-identifier hs-var">filename</span></a><span>
</span><a name="line-111"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679068462"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;svg&quot;</span><span> </span><a href="#local-6989586621679068457"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068463"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068459"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- use attributes on figure, as svg gets dumped in..</span><span>
</span><a name="line-112"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679068465"><span class="hs-identifier hs-var">svg</span></a><span class="hs-special">]</span><span>
</span><a name="line-113"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-114"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068460"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-115"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-116"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-117"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068462"><a href="#local-6989586621679068462"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068463"><a href="#local-6989586621679068463"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068458"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-118"></a><span class="hs-comment">--images</span><span>
</span><a name="line-119"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068466"><a href="#local-6989586621679068466"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068467"><a href="#local-6989586621679068467"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068468"><a href="#local-6989586621679068468"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068469"><a href="#local-6989586621679068469"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-120"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068466"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679068469"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier hs-var">imgExt</span></a><span>
</span><a name="line-121"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><a href="#local-6989586621679068466"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679068471"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679068468"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-122"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;img &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679068470"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068469"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; style=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068472"><span class="hs-identifier hs-var">style</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&gt;&lt;/img&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-123"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-124"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-125"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068470"><a href="#local-6989586621679068470"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068471"><a href="#local-6989586621679068471"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068467"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-126"></a><span> </span><a name="local-6989586621679068472"><a href="#local-6989586621679068472"><span class="hs-identifier">style</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#filterStyle"><span class="hs-identifier hs-var">filterStyle</span></a><span> </span><a href="#local-6989586621679068468"><span class="hs-identifier hs-var">att'</span></a><span>
</span><a name="line-127"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068473"><a href="#local-6989586621679068473"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068474"><a href="#local-6989586621679068474"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068475"><a href="#local-6989586621679068475"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679068476"><a href="#local-6989586621679068476"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068477"><a href="#local-6989586621679068477"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-128"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068473"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679068477"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#imgExt"><span class="hs-identifier hs-var">imgExt</span></a><span>
</span><a name="line-129"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;img&quot;</span><span> </span><a href="#local-6989586621679068473"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><a href="#local-6989586621679068479"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679068475"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-130"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;img &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679068478"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068477"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; style=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068480"><span class="hs-identifier hs-var">style</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&gt;&lt;/img&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-131"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-132"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068476"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-133"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-134"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-135"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068478"><a href="#local-6989586621679068478"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068479"><a href="#local-6989586621679068479"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068474"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-136"></a><span> </span><a name="local-6989586621679068480"><a href="#local-6989586621679068480"><span class="hs-identifier">style</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#filterStyle"><span class="hs-identifier hs-var">filterStyle</span></a><span> </span><a href="#local-6989586621679068475"><span class="hs-identifier hs-var">att'</span></a><span>
</span><a name="line-137"></a><span class="hs-comment">--html-demos etc. as IFrames</span><span>
</span><a name="line-138"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068481"><a href="#local-6989586621679068481"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068482"><a href="#local-6989586621679068482"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068483"><a href="#local-6989586621679068483"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068484"><a href="#local-6989586621679068484"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-139"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068481"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679068484"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier hs-var">demoExt</span></a><span>
</span><a name="line-140"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;iframe &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679068485"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068484"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;?plugin\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><a href="#local-6989586621679068481"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068486"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068483"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/iframe&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-141"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-142"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068485"><a href="#local-6989586621679068485"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068486"><a href="#local-6989586621679068486"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068482"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-143"></a><span class="hs-identifier">media</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Image</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679068487"><a href="#local-6989586621679068487"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068488"><a href="#local-6989586621679068488"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068489"><a href="#local-6989586621679068489"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679068490"><a href="#local-6989586621679068490"><span class="hs-identifier">alt</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068491"><a href="#local-6989586621679068491"><span class="hs-identifier">filename</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><a name="line-144"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068487"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><span class="hs-operator hs-var">||</span><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier hs-var">checkExtension</span></a><span> </span><a href="#local-6989586621679068491"><span class="hs-identifier hs-var">filename</span></a><span> </span><a href="Text.Pandoc.Util.Filter.Media.html#demoExt"><span class="hs-identifier hs-var">demoExt</span></a><span>
</span><a name="line-145"></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figure &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier hs-var">idFilter</span></a><span> </span><span class="hs-string">&quot;demo&quot;</span><span> </span><a href="#local-6989586621679068487"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068493"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679068489"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-146"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;iframe &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679068492"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; src=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068491"><span class="hs-identifier hs-var">filename</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;?plugin\&quot;&gt;&lt;/iframe&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-147"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;figcaption&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-148"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679068490"><span class="hs-identifier hs-var">alt</span></a><span>
</span><a name="line-149"></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;/figcaption&gt;&lt;/figure&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-150"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-151"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679068492"><a href="#local-6989586621679068492"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679068493"><a href="#local-6989586621679068493"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068488"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-152"></a><span class="hs-comment">-- if not matched</span><span>
</span><a name="line-153"></a><span class="hs-identifier">media</span><span> </span><a name="local-6989586621679068494"><a href="#local-6989586621679068494"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679068494"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-154"></a><span>
</span><a name="line-155"></a><span class="hs-identifier">checkExtension</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Bool</span><span>
</span><a name="line-156"></a><a name="checkExtension"><a href="Text.Pandoc.Util.Filter.Media.html#checkExtension"><span class="hs-identifier">checkExtension</span></a></a><span> </span><a name="local-6989586621679068495"><a href="#local-6989586621679068495"><span class="hs-identifier">fn</span></a></a><span> </span><a name="local-6989586621679068496"><a href="#local-6989586621679068496"><span class="hs-identifier">exts</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">fmap</span><span> </span><span class="hs-identifier hs-var">toLower</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">tail</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">takeExtension</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679068495"><span class="hs-identifier hs-var">fn</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679068496"><span class="hs-identifier hs-var">exts</span></a><span>
</span><a name="line-157"></a><span>
</span><a name="line-158"></a><span class="hs-identifier">idFilter</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-159"></a><a name="idFilter"><a href="Text.Pandoc.Util.Filter.Media.html#idFilter"><span class="hs-identifier">idFilter</span></a></a><span> </span><a name="local-6989586621679068896"><a href="#local-6989586621679068896"><span class="hs-identifier">a</span></a></a><span> </span><a name="local-6989586621679068897"><a href="#local-6989586621679068897"><span class="hs-identifier">b</span></a></a><span>
</span><a name="line-160"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679068896"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><a href="#local-6989586621679068897"><span class="hs-identifier hs-var">b</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><a name="line-161"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679068897"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-162"></a><span>
</span><a name="line-163"></a><span class="hs-identifier">filterStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-164"></a><a name="filterStyle"><a href="Text.Pandoc.Util.Filter.Media.html#filterStyle"><span class="hs-identifier">filterStyle</span></a></a><span> </span><a name="local-6989586621679068898"><a href="#local-6989586621679068898"><span class="hs-identifier">kvpairs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">fst</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;width&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;height&quot;</span><span class="hs-special">]</span><span> </span><a href="#local-6989586621679068898"><span class="hs-identifier hs-var">kvpairs</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><a name="line-165"></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><a name="line-166"></a><span> </span><span class="hs-keyword">as</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-var">intercalate</span><span> </span><span class="hs-string">&quot;;&quot;</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-identifier hs-var">snd</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><span class="hs-keyword">as</span><span>
</span><a name="line-167"></a></pre></body></html>

View File

@ -12,29 +12,29 @@
</span><a name="line-12"></a><span class="hs-comment">-- Move bottom-Up through the structure, find quiz-answers and remove the</span><span>
</span><a name="line-13"></a><span class="hs-comment">-- incorrect formattet ones from the Block they came from.</span><span>
</span><a name="line-14"></a><span class="hs-identifier">quiz</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Block</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Block</span><span class="hs-special">]</span><span>
</span><a name="line-15"></a><a name="quiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#quiz"><span class="hs-identifier">quiz</span></a></a><span> </span><a name="local-6989586621679038523"><a href="#local-6989586621679038523"><span class="hs-identifier">pb</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Plain</span><span> </span><a name="local-6989586621679038524"><a href="#local-6989586621679038524"><span class="hs-identifier">b</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier hs-var">makeQuiz</span></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">query</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span> </span><a href="#local-6989586621679038523"><span class="hs-identifier hs-var">pb</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679038524"><span class="hs-identifier hs-var">b</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-16"></a><span class="hs-identifier">quiz</span><span> </span><a name="local-6989586621679042244"><a href="#local-6989586621679042244"><span class="hs-identifier">pb</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Para</span><span> </span><a name="local-6989586621679042245"><a href="#local-6989586621679042245"><span class="hs-identifier">b</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier hs-var">makeQuiz</span></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">query</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span> </span><a href="#local-6989586621679042244"><span class="hs-identifier hs-var">pb</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679042245"><span class="hs-identifier hs-var">b</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-17"></a><span class="hs-identifier">quiz</span><span> </span><a name="local-6989586621679042246"><a href="#local-6989586621679042246"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679042246"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-15"></a><a name="quiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#quiz"><span class="hs-identifier">quiz</span></a></a><span> </span><a name="local-6989586621679022599"><a href="#local-6989586621679022599"><span class="hs-identifier">pb</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Plain</span><span> </span><a name="local-6989586621679022600"><a href="#local-6989586621679022600"><span class="hs-identifier">b</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier hs-var">makeQuiz</span></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">query</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span> </span><a href="#local-6989586621679022599"><span class="hs-identifier hs-var">pb</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679022600"><span class="hs-identifier hs-var">b</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-16"></a><span class="hs-identifier">quiz</span><span> </span><a name="local-6989586621679026370"><a href="#local-6989586621679026370"><span class="hs-identifier">pb</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Para</span><span> </span><a name="local-6989586621679026371"><a href="#local-6989586621679026371"><span class="hs-identifier">b</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier hs-var">makeQuiz</span></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">query</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span> </span><a href="#local-6989586621679026370"><span class="hs-identifier hs-var">pb</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier hs-var">findQuiz</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679026371"><span class="hs-identifier hs-var">b</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-17"></a><span class="hs-identifier">quiz</span><span> </span><a name="local-6989586621679026372"><a href="#local-6989586621679026372"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679026372"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-18"></a><span>
</span><a name="line-19"></a><span class="hs-comment">-- If we have []{.answer} then we have a quiz-answer</span><span>
</span><a name="line-20"></a><span class="hs-comment">-- maybe with a tooltip</span><span>
</span><a name="line-21"></a><span class="hs-identifier">findQuiz</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Inline</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">Attr</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">Maybe</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-identifier hs-type">Attr</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-22"></a><a name="findQuiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier">findQuiz</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><a name="local-6989586621679042247"><a href="#local-6989586621679042247"><span class="hs-identifier">attributes</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><span> </span><a name="local-6989586621679042248"><a href="#local-6989586621679042248"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><a name="local-6989586621679042249"><a href="#local-6989586621679042249"><span class="hs-identifier">answerText</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-23"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;answer&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679042248"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><a href="#local-6989586621679042247"><span class="hs-identifier hs-var">attributes</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679042250"><span class="hs-identifier hs-var">answerText'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679042251"><span class="hs-identifier hs-var">tooltip</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-22"></a><a name="findQuiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#findQuiz"><span class="hs-identifier">findQuiz</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><a name="local-6989586621679026373"><a href="#local-6989586621679026373"><span class="hs-identifier">attributes</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><span> </span><a name="local-6989586621679026374"><a href="#local-6989586621679026374"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><a name="local-6989586621679026375"><a href="#local-6989586621679026375"><span class="hs-identifier">answerText</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-23"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;answer&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679026374"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><a href="#local-6989586621679026373"><span class="hs-identifier hs-var">attributes</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679026376"><span class="hs-identifier hs-var">answerText'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679026377"><span class="hs-identifier hs-var">tooltip</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-24"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-25"></a><span> </span><a name="local-6989586621679042250"><a href="#local-6989586621679042250"><span class="hs-identifier">answerText'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">isNothing</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier hs-var">findTooltip</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679042249"><span class="hs-identifier hs-var">answerText</span></a><span> </span><span class="hs-comment">--filter everything that is a tooltip</span><span>
</span><a name="line-26"></a><span> </span><a name="local-6989586621679042251"><a href="#local-6989586621679042251"><span class="hs-identifier">tooltip</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">listToMaybe</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-identifier hs-var">mapMaybe</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier hs-var">findTooltip</span></a><span> </span><a href="#local-6989586621679042249"><span class="hs-identifier hs-var">answerText</span></a><span> </span><span class="hs-comment">--get the first span that is labled tooltip</span><span>
</span><a name="line-25"></a><span> </span><a name="local-6989586621679026376"><a href="#local-6989586621679026376"><span class="hs-identifier">answerText'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">isNothing</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier hs-var">findTooltip</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679026375"><span class="hs-identifier hs-var">answerText</span></a><span> </span><span class="hs-comment">--filter everything that is a tooltip</span><span>
</span><a name="line-26"></a><span> </span><a name="local-6989586621679026377"><a href="#local-6989586621679026377"><span class="hs-identifier">tooltip</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">listToMaybe</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-identifier hs-var">mapMaybe</span><span> </span><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier hs-var">findTooltip</span></a><span> </span><a href="#local-6989586621679026375"><span class="hs-identifier hs-var">answerText</span></a><span> </span><span class="hs-comment">--get the first span that is labled tooltip</span><span>
</span><a name="line-27"></a><span class="hs-identifier">findQuiz</span><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><a name="line-28"></a><span>
</span><a name="line-29"></a><span class="hs-comment">-- If we have []{.tooltip} we have a tooltip ;)</span><span>
</span><a name="line-30"></a><span class="hs-comment">-- we save the text and the attributes in a tuple</span><span>
</span><a name="line-31"></a><span class="hs-identifier">findTooltip</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Inline</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Maybe</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-identifier hs-type">Attr</span><span class="hs-special">)</span><span>
</span><a name="line-32"></a><a name="findTooltip"><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier">findTooltip</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><a name="local-6989586621679043307"><a href="#local-6989586621679043307"><span class="hs-identifier">attr</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><a name="local-6989586621679043308"><a href="#local-6989586621679043308"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><a name="local-6989586621679043309"><a href="#local-6989586621679043309"><span class="hs-identifier">tooltipText</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;tooltip&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679043308"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Just</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679043309"><span class="hs-identifier hs-var">tooltipText</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679043307"><span class="hs-identifier hs-var">attr</span></a><span class="hs-special">)</span><span>
</span><a name="line-32"></a><a name="findTooltip"><a href="Text.Pandoc.Util.Filter.Quiz.html#findTooltip"><span class="hs-identifier">findTooltip</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><a name="local-6989586621679027487"><a href="#local-6989586621679027487"><span class="hs-identifier">attr</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><a name="local-6989586621679027488"><a href="#local-6989586621679027488"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><a name="local-6989586621679027489"><a href="#local-6989586621679027489"><span class="hs-identifier">tooltipText</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;tooltip&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679027488"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Just</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679027489"><span class="hs-identifier hs-var">tooltipText</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679027487"><span class="hs-identifier hs-var">attr</span></a><span class="hs-special">)</span><span>
</span><a name="line-34"></a><span class="hs-identifier">findTooltip</span><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Nothing</span><span>
</span><a name="line-35"></a><span>
</span><a name="line-36"></a><span class="hs-comment">-- Generate Divs for the quiz</span><span>
</span><a name="line-37"></a><span class="hs-identifier">makeQuiz</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">Attr</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">Maybe</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-identifier hs-type">Inline</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-identifier hs-type">Attr</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Block</span><span>
</span><a name="line-38"></a><a name="makeQuiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier">makeQuiz</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679043310"><a href="#local-6989586621679043310"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679043311"><a href="#local-6989586621679043311"><span class="hs-identifier">answer</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Nothing</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679043310"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679043311"><span class="hs-identifier hs-var">answer</span></a><span class="hs-special">]</span><span>
</span><a name="line-39"></a><span class="hs-identifier">makeQuiz</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679043312"><a href="#local-6989586621679043312"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679043313"><a href="#local-6989586621679043313"><span class="hs-identifier">answer</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Just</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679043314"><a href="#local-6989586621679043314"><span class="hs-identifier">tooltip</span></a></a><span class="hs-special">,</span><a name="local-6989586621679043315"><a href="#local-6989586621679043315"><span class="hs-identifier">a</span></a></a><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679043312"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679043313"><span class="hs-identifier hs-var">answer</span></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679043315"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679043314"><span class="hs-identifier hs-var">tooltip</span></a><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><a name="line-38"></a><a name="makeQuiz"><a href="Text.Pandoc.Util.Filter.Quiz.html#makeQuiz"><span class="hs-identifier">makeQuiz</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679027490"><a href="#local-6989586621679027490"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679027491"><a href="#local-6989586621679027491"><span class="hs-identifier">answer</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Nothing</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679027490"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679027491"><span class="hs-identifier hs-var">answer</span></a><span class="hs-special">]</span><span>
</span><a name="line-39"></a><span class="hs-identifier">makeQuiz</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679027492"><a href="#local-6989586621679027492"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679027493"><a href="#local-6989586621679027493"><span class="hs-identifier">answer</span></a></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Just</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679027494"><a href="#local-6989586621679027494"><span class="hs-identifier">tooltip</span></a></a><span class="hs-special">,</span><a name="local-6989586621679027495"><a href="#local-6989586621679027495"><span class="hs-identifier">a</span></a></a><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679027492"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679027493"><span class="hs-identifier hs-var">answer</span></a><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">Div</span><span> </span><a href="#local-6989586621679027495"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Plain</span><span> </span><a href="#local-6989586621679027494"><span class="hs-identifier hs-var">tooltip</span></a><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><a name="line-40"></a></pre></body></html>

View File

@ -18,26 +18,26 @@
</span><a name="line-18"></a><span class="hs-comment">-- automatically</span><span>
</span><a name="line-19"></a><span class="hs-comment">-- - .fragment and .frame work properly on divs</span><span>
</span><a name="line-20"></a><span class="hs-identifier">styling</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Block</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">IO</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Block</span><span class="hs-special">]</span><span>
</span><a name="line-21"></a><a name="styling"><a href="Text.Pandoc.Util.Filter.Styling.html#styling"><span class="hs-identifier">styling</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;col&quot;</span><span class="hs-special">,</span><a name="local-6989586621679084969"><a href="#local-6989586621679084969"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679084970"><a href="#local-6989586621679084970"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679084971"><a href="#local-6989586621679084971"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier hs-var">toBlockHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;div style=\&quot;float:left; margin-bottom:10px;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679084972"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679084973"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679084970"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-22"></a><span> </span><span class="hs-operator hs-var">++</span><span> </span><a href="#local-6989586621679084971"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-21"></a><a name="styling"><a href="Text.Pandoc.Util.Filter.Styling.html#styling"><span class="hs-identifier">styling</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;col&quot;</span><span class="hs-special">,</span><a name="local-6989586621679074170"><a href="#local-6989586621679074170"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679074171"><a href="#local-6989586621679074171"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679074172"><a href="#local-6989586621679074172"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier hs-var">toBlockHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;div style=\&quot;float:left; margin-bottom:10px;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679074173"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679074174"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679074171"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-22"></a><span> </span><span class="hs-operator hs-var">++</span><span> </span><a href="#local-6989586621679074172"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-23"></a><span> </span><span class="hs-operator hs-var">++</span><span> </span><span class="hs-special">[</span><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier hs-var">toBlockHtml</span></a><span class="hs-string">&quot;&lt;/div&gt;&quot;</span><span class="hs-special">]</span><span>
</span><a name="line-24"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-25"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679084972"><a href="#local-6989586621679084972"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679084973"><a href="#local-6989586621679084973"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679084969"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-26"></a><span class="hs-identifier">styling</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">CodeBlock</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679084974"><a href="#local-6989586621679084974"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679084975"><a href="#local-6989586621679084975"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679084976"><a href="#local-6989586621679084976"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679084977"><a href="#local-6989586621679084977"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span>
</span><a name="line-27"></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">CodeBlock</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679084974"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;data-trim&quot;</span><span>
</span><a name="line-25"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679074173"><a href="#local-6989586621679074173"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679074174"><a href="#local-6989586621679074174"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679074170"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-26"></a><span class="hs-identifier">styling</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">CodeBlock</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679074175"><a href="#local-6989586621679074175"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679074176"><a href="#local-6989586621679074176"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679074177"><a href="#local-6989586621679074177"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679074178"><a href="#local-6989586621679074178"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span>
</span><a name="line-27"></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">CodeBlock</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679074175"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;data-trim&quot;</span><span>
</span><a name="line-28"></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;data-noescape&quot;</span><span>
</span><a name="line-29"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679084975"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-30"></a><span> </span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679084976"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span>
</span><a name="line-31"></a><span> </span><a href="#local-6989586621679084977"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-32"></a><span class="hs-identifier">styling</span><span> </span><a name="local-6989586621679084978"><a href="#local-6989586621679084978"><span class="hs-identifier">div</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679084979"><a href="#local-6989586621679084979"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679084980"><a href="#local-6989586621679084980"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679084981"><a href="#local-6989586621679084981"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679084982"><a href="#local-6989586621679084982"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679084980"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679084979"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679084980"><span class="hs-identifier hs-var">att</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: block;&quot;</span><span> </span><a href="#local-6989586621679084981"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679084982"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-34"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679084980"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679084979"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-comment">--insert fragment</span><span>
</span><a name="line-29"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679074176"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-30"></a><span> </span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679074177"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span>
</span><a name="line-31"></a><span> </span><a href="#local-6989586621679074178"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-32"></a><span class="hs-identifier">styling</span><span> </span><a name="local-6989586621679074179"><a href="#local-6989586621679074179"><span class="hs-identifier">div</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679074180"><a href="#local-6989586621679074180"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><a name="local-6989586621679074181"><a href="#local-6989586621679074181"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><a name="local-6989586621679074182"><a href="#local-6989586621679074182"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679074183"><a href="#local-6989586621679074183"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-33"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679074181"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679074180"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679074181"><span class="hs-identifier hs-var">att</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: block;&quot;</span><span> </span><a href="#local-6989586621679074182"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679074183"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-34"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679074181"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-var">Div</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679074180"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-comment">--insert fragment</span><span>
</span><a name="line-35"></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;current-visible&quot;</span><span> </span><span class="hs-comment">--insert current-visible</span><span>
</span><a name="line-36"></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-operator hs-var">/=</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-comment">--remove frame</span><span>
</span><a name="line-37"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679084980"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-38"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: block;&quot;</span><span> </span><a href="#local-6989586621679084981"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679084982"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-39"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679084978"><span class="hs-identifier hs-var">div</span></a><span class="hs-special">]</span><span>
</span><a name="line-40"></a><span class="hs-identifier">styling</span><span> </span><a name="local-6989586621679084983"><a href="#local-6989586621679084983"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679084983"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-37"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679074181"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-38"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: block;&quot;</span><span> </span><a href="#local-6989586621679074182"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679074183"><span class="hs-identifier hs-var">inner</span></a><span class="hs-special">]</span><span>
</span><a name="line-39"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679074179"><span class="hs-identifier hs-var">div</span></a><span class="hs-special">]</span><span>
</span><a name="line-40"></a><span class="hs-identifier">styling</span><span> </span><a name="local-6989586621679074184"><a href="#local-6989586621679074184"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679074184"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">]</span><span>
</span><a name="line-41"></a><span>
</span><a name="line-42"></a><span>
</span><a name="line-43"></a><span class="hs-comment">-- | Inline-Styling</span><span>
@ -48,18 +48,18 @@
</span><a name="line-48"></a><span class="hs-comment">-- - .vspace inside span adds a vertical space with @height=xxx@</span><span>
</span><a name="line-49"></a><span class="hs-comment">-- - .hspace inside span adds a horizontal space with @width=xxx@</span><span>
</span><a name="line-50"></a><span class="hs-identifier">inlineStyling</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Inline</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Inline</span><span>
</span><a name="line-51"></a><a name="inlineStyling"><a href="Text.Pandoc.Util.Filter.Styling.html#inlineStyling"><span class="hs-identifier">inlineStyling</span></a></a><span> </span><a name="local-6989586621679084984"><a href="#local-6989586621679084984"><span class="hs-identifier">span</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679084985"><a href="#local-6989586621679084985"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679084986"><a href="#local-6989586621679084986"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679084987"><a href="#local-6989586621679084987"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679084988"><a href="#local-6989586621679084988"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-52"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679084986"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679084985"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679084986"><span class="hs-identifier hs-var">att</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: inline-block;&quot;</span><span> </span><a href="#local-6989586621679084987"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679084988"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-53"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679084986"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679084985"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-comment">--insert fragment</span><span>
</span><a name="line-51"></a><a name="inlineStyling"><a href="Text.Pandoc.Util.Filter.Styling.html#inlineStyling"><span class="hs-identifier">inlineStyling</span></a></a><span> </span><a name="local-6989586621679074185"><a href="#local-6989586621679074185"><span class="hs-identifier">span</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679074186"><a href="#local-6989586621679074186"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679074187"><a href="#local-6989586621679074187"><span class="hs-identifier">att</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679074188"><a href="#local-6989586621679074188"><span class="hs-identifier">att'</span></a></a><span class="hs-special">)</span><span> </span><a name="local-6989586621679074189"><a href="#local-6989586621679074189"><span class="hs-identifier">inner</span></a></a><span class="hs-special">)</span><span>
</span><a name="line-52"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679074187"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679074186"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679074187"><span class="hs-identifier hs-var">att</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: inline-block;&quot;</span><span> </span><a href="#local-6989586621679074188"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679074189"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-53"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679074187"><span class="hs-identifier hs-var">att</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">Span</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679074186"><span class="hs-identifier hs-var">id'</span></a><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;fragment&quot;</span><span> </span><span class="hs-comment">--insert fragment</span><span>
</span><a name="line-54"></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><span class="hs-string">&quot;current-visible&quot;</span><span> </span><span class="hs-comment">--insert current-visible</span><span>
</span><a name="line-55"></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-operator hs-var">/=</span><span> </span><span class="hs-string">&quot;frame&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-comment">--remove frame</span><span>
</span><a name="line-56"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679084986"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-57"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: inline-block;&quot;</span><span> </span><a href="#local-6989586621679084987"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679084988"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-58"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679084985"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;vspace&quot;</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;div style=\&quot;clear:both;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679084989"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679084990"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679084987"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/div&gt;&quot;</span><span>
</span><a name="line-59"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679084985"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;hspace&quot;</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;span &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679084989"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679084990"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679084987"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/span&gt;&quot;</span><span>
</span><a name="line-60"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679084984"><span class="hs-identifier hs-var">span</span></a><span>
</span><a name="line-56"></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="#local-6989586621679074187"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-57"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><span class="hs-string">&quot;display: inline-block;&quot;</span><span> </span><a href="#local-6989586621679074188"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679074189"><span class="hs-identifier hs-var">inner</span></a><span>
</span><a name="line-58"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679074186"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;vspace&quot;</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;div style=\&quot;clear:both;\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679074190"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679074191"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679074188"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/div&gt;&quot;</span><span>
</span><a name="line-59"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679074186"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;hspace&quot;</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">&quot;&lt;span &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679074190"><span class="hs-identifier hs-var">direct</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><a href="#local-6989586621679074191"><span class="hs-identifier hs-var">css</span></a><span class="hs-special">,</span><a href="#local-6989586621679074188"><span class="hs-identifier hs-var">att'</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;&gt;&lt;/span&gt;&quot;</span><span>
</span><a name="line-60"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679074185"><span class="hs-identifier hs-var">span</span></a><span>
</span><a name="line-61"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-62"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679084989"><a href="#local-6989586621679084989"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679084990"><a href="#local-6989586621679084990"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679084986"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-63"></a><span class="hs-identifier">inlineStyling</span><span> </span><a name="local-6989586621679084991"><a href="#local-6989586621679084991"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679084991"><span class="hs-identifier hs-var">x</span></a><span>
</span><a name="line-62"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679074190"><a href="#local-6989586621679074190"><span class="hs-identifier">direct</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679074191"><a href="#local-6989586621679074191"><span class="hs-identifier">css</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span> </span><a href="#local-6989586621679074187"><span class="hs-identifier hs-var">att</span></a><span>
</span><a name="line-63"></a><span class="hs-identifier">inlineStyling</span><span> </span><a name="local-6989586621679074192"><a href="#local-6989586621679074192"><span class="hs-identifier">x</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679074192"><span class="hs-identifier hs-var">x</span></a><span>
</span><a name="line-64"></a><span>
</span><a name="line-65"></a></pre></body></html>

View File

@ -1,103 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">Util</span><span class="hs-operator">.</span><span class="hs-identifier">Filter</span><span>
</span><a name="line-2"></a><span> </span><span class="hs-special">(</span><span> </span><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier hs-var">attToString</span></a><span>
</span><a name="line-3"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier hs-var">revealjsSpecialAttrs</span></a><span>
</span><a name="line-4"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span>
</span><a name="line-5"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span>
</span><a name="line-6"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier hs-var">toBlockHtml</span></a><span>
</span><a name="line-7"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span>
</span><a name="line-8"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span>
</span><a name="line-9"></a><span> </span><span class="hs-special">)</span><span>
</span><a name="line-10"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-11"></a><span>
</span><a name="line-12"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">Definition</span><span>
</span><a name="line-13"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Monoid</span><span>
</span><a name="line-14"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">List</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">partition</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">isInfixOf</span><span class="hs-special">)</span><span>
</span><a name="line-15"></a><span>
</span><a name="line-16"></a><span class="hs-comment">-- | adds a given String to the list if not in there; Does nothing if the</span><span>
</span><a name="line-17"></a><span class="hs-comment">-- given String is already present.</span><span>
</span><a name="line-18"></a><span class="hs-identifier">addToAtt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Eq</span><span> </span><a href="#local-6989586621679076134"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=&gt;</span><span> </span><a href="#local-6989586621679076134"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679076134"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679076134"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span>
</span><a name="line-19"></a><a name="addToAtt"><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier">addToAtt</span></a></a><span> </span><a name="local-6989586621679076135"><a href="#local-6989586621679076135"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679076136"><a href="#local-6989586621679076136"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span>
</span><a name="line-20"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679076136"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><a href="#local-6989586621679076135"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679076135"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span>
</span><a name="line-21"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679076136"><span class="hs-identifier hs-var">a</span></a><span class="hs-glyph">:</span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><a href="#local-6989586621679076135"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-keyword">as</span><span>
</span><a name="line-22"></a><span class="hs-identifier">addToAtt</span><span> </span><a name="local-6989586621679076138"><a href="#local-6989586621679076138"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679076138"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">]</span><span>
</span><a name="line-23"></a><span>
</span><a name="line-24"></a><span class="hs-comment">-- | adds given String to List of key-value-pairs (like in 'Attr')</span><span>
</span><a name="line-25"></a><span class="hs-comment">-- in the \&quot;style\&quot;-Key.</span><span>
</span><a name="line-26"></a><span class="hs-comment">--</span><span>
</span><a name="line-27"></a><span class="hs-comment">-- Useful when trying to add CSS-styles directly to (generated) elements</span><span>
</span><a name="line-28"></a><span class="hs-identifier">addToStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-29"></a><span class="hs-comment">-- we are looking for style and inject</span><span>
</span><a name="line-30"></a><a name="addToStyle"><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier">addToStyle</span></a></a><span> </span><a name="local-6989586621679076139"><a href="#local-6989586621679076139"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><a name="local-6989586621679076140"><a href="#local-6989586621679076140"><span class="hs-identifier">val</span></a></a><span class="hs-special">)</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-keyword">if</span><span> </span><a href="#local-6989586621679076139"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">isInfixOf</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679076140"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-keyword">then</span><span> </span><a href="#local-6989586621679076140"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-keyword">else</span><span> </span><a href="#local-6989586621679076140"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076139"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">)</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span>
</span><a name="line-31"></a><span class="hs-comment">-- if we land here the current one is not style -&gt; skip</span><span>
</span><a name="line-32"></a><span class="hs-identifier">addToStyle</span><span> </span><a name="local-6989586621679076271"><a href="#local-6989586621679076271"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679076272"><a href="#local-6989586621679076272"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679076272"><span class="hs-identifier hs-var">a</span></a><span class="hs-glyph">:</span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><a href="#local-6989586621679076271"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-keyword">as</span><span>
</span><a name="line-33"></a><span class="hs-comment">-- if we land here we have no more to skip -&gt; add</span><span>
</span><a name="line-34"></a><span class="hs-identifier">addToStyle</span><span> </span><a name="local-6989586621679076274"><a href="#local-6989586621679076274"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679076274"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-35"></a><span>
</span><a name="line-36"></a><span class="hs-comment">-- | converts Attributes to String for usage in HTML</span><span>
</span><a name="line-37"></a><span class="hs-comment">--</span><span>
</span><a name="line-38"></a><span class="hs-comment">-- Also converts @width=xxx@ and @height=xxx@ to the</span><span>
</span><a name="line-39"></a><span class="hs-comment">-- corresponding style-attributes</span><span>
</span><a name="line-40"></a><span class="hs-identifier">attToString</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Attr</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-41"></a><a name="attToString"><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier">attToString</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><span> </span><a name="local-6989586621679076275"><a href="#local-6989586621679076275"><span class="hs-identifier">classes</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679076276"><a href="#local-6989586621679076276"><span class="hs-identifier">kvpairs</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;class=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679076275"><span class="hs-identifier hs-var">classes</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076278"><a href="#local-6989586621679076278"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679076279"><a href="#local-6989586621679076279"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076278"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076279"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679076277"><span class="hs-identifier hs-var">kvpairs'</span></a><span class="hs-special">)</span><span>
</span><a name="line-42"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-43"></a><span> </span><a name="local-6989586621679076277"><a href="#local-6989586621679076277"><span class="hs-identifier">kvpairs'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;width&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;height&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;transform&quot;</span><span class="hs-special">]</span><span> </span><a href="#local-6989586621679076276"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-44"></a><span class="hs-identifier">attToString</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679076289"><a href="#local-6989586621679076289"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679076290"><a href="#local-6989586621679076290"><span class="hs-identifier">classes</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679076291"><a href="#local-6989586621679076291"><span class="hs-identifier">kvpairs</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;id=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076289"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; class=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679076290"><span class="hs-identifier hs-var">classes</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076293"><a href="#local-6989586621679076293"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679076294"><a href="#local-6989586621679076294"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076293"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076294"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679076292"><span class="hs-identifier hs-var">kvpairs'</span></a><span class="hs-special">)</span><span>
</span><a name="line-45"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-46"></a><span> </span><a name="local-6989586621679076292"><a href="#local-6989586621679076292"><span class="hs-identifier">kvpairs'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;width&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;height&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;transform&quot;</span><span class="hs-special">]</span><span> </span><a href="#local-6989586621679076291"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-47"></a><span>
</span><a name="line-48"></a><span class="hs-identifier">convertToStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-49"></a><a name="convertToStyle"><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier">convertToStyle</span></a></a><span> </span><a name="local-6989586621679076295"><a href="#local-6989586621679076295"><span class="hs-identifier">keys</span></a></a><span> </span><a name="local-6989586621679076296"><a href="#local-6989586621679076296"><span class="hs-identifier">kvpairs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679076300"><span class="hs-identifier hs-var">newstyle</span></a><span class="hs-special">)</span><span class="hs-glyph">:</span><a href="#local-6989586621679076299"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-50"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-51"></a><span> </span><a name="local-6989586621679076297"><a href="#local-6989586621679076297"><span class="hs-identifier">oldstyle</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076301"><a href="#local-6989586621679076301"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076301"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679076296"><span class="hs-identifier hs-var">kvpairs</span></a><span> </span><span class="hs-keyword">of</span><span>
</span><a name="line-52"></a><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><a name="local-6989586621679076302"><a href="#local-6989586621679076302"><span class="hs-identifier">st</span></a></a><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076302"><span class="hs-identifier hs-var">st</span></a><span>
</span><a name="line-53"></a><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><a name="line-54"></a><span> </span><a name="local-6989586621679076298"><a href="#local-6989586621679076298"><span class="hs-identifier">stylesToAdd</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076303"><a href="#local-6989586621679076303"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076303"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679076295"><span class="hs-identifier hs-var">keys</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679076296"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-55"></a><span> </span><a name="local-6989586621679076299"><a href="#local-6989586621679076299"><span class="hs-identifier">rest</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076304"><a href="#local-6989586621679076304"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076304"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">notElem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679076295"><span class="hs-identifier hs-var">keys</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679076296"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-56"></a><span> </span><a name="local-6989586621679076300"><a href="#local-6989586621679076300"><span class="hs-identifier">newstyle</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">concat</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679076305"><a href="#local-6989586621679076305"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679076306"><a href="#local-6989586621679076306"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679076305"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;:&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076306"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679076298"><span class="hs-identifier hs-var">stylesToAdd</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679076297"><span class="hs-identifier hs-var">oldstyle</span></a><span>
</span><a name="line-57"></a><span>
</span><a name="line-58"></a><span class="hs-comment">-- | revealjs has some special attributes that has to be</span><span>
</span><a name="line-59"></a><span class="hs-comment">-- passed to the html, but Pandoc only allows</span><span>
</span><a name="line-60"></a><span class="hs-comment">-- @key=value@-attributes, so we have to abuse</span><span>
</span><a name="line-61"></a><span class="hs-comment">-- @.class@ to rewrite them.</span><span>
</span><a name="line-62"></a><span class="hs-comment">--</span><span>
</span><a name="line-63"></a><span class="hs-comment">-- The classes that get rewritten are listed here.</span><span>
</span><a name="line-64"></a><span class="hs-comment">--</span><span>
</span><a name="line-65"></a><span class="hs-comment">-- You probably want 'classToRevealAttr', as that</span><span>
</span><a name="line-66"></a><span class="hs-comment">-- is a wrapper for splitting the class-attribute</span><span>
</span><a name="line-67"></a><span class="hs-identifier">revealjsSpecialAttrs</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-68"></a><a name="revealjsSpecialAttrs"><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier">revealjsSpecialAttrs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span>
</span><a name="line-69"></a><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;data-markdown&quot;</span><span>
</span><a name="line-70"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-timing&quot;</span><span>
</span><a name="line-71"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-template&quot;</span><span>
</span><a name="line-72"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-autoplay&quot;</span><span>
</span><a name="line-73"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-prevent-swipe&quot;</span><span>
</span><a name="line-74"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-background-interactive&quot;</span><span>
</span><a name="line-75"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-trim&quot;</span><span>
</span><a name="line-76"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-noescape&quot;</span><span>
</span><a name="line-77"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-ignore&quot;</span><span>
</span><a name="line-78"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;controls&quot;</span><span>
</span><a name="line-79"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-80"></a><span>
</span><a name="line-81"></a><span class="hs-comment">-- | revealjs has some special attributes that has to be</span><span>
</span><a name="line-82"></a><span class="hs-comment">-- passed to the html, but Pandoc only allows</span><span>
</span><a name="line-83"></a><span class="hs-comment">-- @key=value@-attributes, so we have to abuse</span><span>
</span><a name="line-84"></a><span class="hs-comment">-- @.class@ to rewrite them.</span><span>
</span><a name="line-85"></a><span class="hs-comment">--</span><span>
</span><a name="line-86"></a><span class="hs-comment">-- This is a wrapper-function which just splits the list</span><span>
</span><a name="line-87"></a><span class="hs-comment">-- into real classes and 'revealjsSpecialAttrs'</span><span>
</span><a name="line-88"></a><span class="hs-identifier">classToRevealAttr</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><a name="line-89"></a><a name="classToRevealAttr"><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier">classToRevealAttr</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">partition</span><span> </span><span class="hs-special">(</span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier hs-var">revealjsSpecialAttrs</span></a><span class="hs-special">)</span><span>
</span><a name="line-90"></a><span>
</span><a name="line-91"></a><span class="hs-comment">-- | small wrapper around @RawInline (Format &quot;html&quot;)@</span><span>
</span><a name="line-92"></a><span class="hs-comment">-- as this is less line-noise in the filters and the</span><span>
</span><a name="line-93"></a><span class="hs-comment">-- intent is more clear.</span><span>
</span><a name="line-94"></a><span class="hs-identifier">toHtml</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Inline</span><span>
</span><a name="line-95"></a><a name="toHtml"><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier">toHtml</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">RawInline</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Format</span><span> </span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">)</span><span>
</span><a name="line-96"></a><span>
</span><a name="line-97"></a><span>
</span><a name="line-98"></a><span class="hs-comment">-- | small wrapper around @Raw (Format &quot;html&quot;)@</span><span>
</span><a name="line-99"></a><span class="hs-comment">-- as this is less line-noise in the filters and the</span><span>
</span><a name="line-100"></a><span class="hs-comment">-- intent is more clear.</span><span>
</span><a name="line-101"></a><span class="hs-identifier">toBlockHtml</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Block</span><span>
</span><a name="line-102"></a><a name="toBlockHtml"><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier">toBlockHtml</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">RawBlock</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Format</span><span> </span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">)</span><span>
</span><a name="line-103"></a></pre></body></html>
</span><a name="line-3"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span>
</span><a name="line-4"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier hs-var">revealjsSpecialAttrs</span></a><span>
</span><a name="line-5"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier hs-var">revealjsRewriteAttr</span></a><span>
</span><a name="line-6"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier hs-var">classToRevealAttr</span></a><span>
</span><a name="line-7"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier hs-var">toHtml</span></a><span>
</span><a name="line-8"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier hs-var">toBlockHtml</span></a><span>
</span><a name="line-9"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span>
</span><a name="line-10"></a><span> </span><span class="hs-special">,</span><span> </span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span>
</span><a name="line-11"></a><span> </span><span class="hs-special">)</span><span>
</span><a name="line-12"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-13"></a><span>
</span><a name="line-14"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Text</span><span class="hs-operator">.</span><span class="hs-identifier">Pandoc</span><span class="hs-operator">.</span><span class="hs-identifier">Definition</span><span>
</span><a name="line-15"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Monoid</span><span>
</span><a name="line-16"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">List</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">partition</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">isInfixOf</span><span class="hs-special">)</span><span>
</span><a name="line-17"></a><span>
</span><a name="line-18"></a><span class="hs-comment">-- | adds a given String to the list if not in there; Does nothing if the</span><span>
</span><a name="line-19"></a><span class="hs-comment">-- given String is already present.</span><span>
</span><a name="line-20"></a><span class="hs-identifier">addToAtt</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Eq</span><span> </span><a href="#local-6989586621679064265"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=&gt;</span><span> </span><a href="#local-6989586621679064265"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679064265"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679064265"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span>
</span><a name="line-21"></a><a name="addToAtt"><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier">addToAtt</span></a></a><span> </span><a name="local-6989586621679064266"><a href="#local-6989586621679064266"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679064267"><a href="#local-6989586621679064267"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span>
</span><a name="line-22"></a><span> </span><span class="hs-glyph">|</span><span> </span><a href="#local-6989586621679064267"><span class="hs-identifier hs-var">a</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><a href="#local-6989586621679064266"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679064266"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span>
</span><a name="line-23"></a><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier hs-var">otherwise</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679064267"><span class="hs-identifier hs-var">a</span></a><span class="hs-glyph">:</span><a href="Text.Pandoc.Util.Filter.html#addToAtt"><span class="hs-identifier hs-var">addToAtt</span></a><span> </span><a href="#local-6989586621679064266"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-keyword">as</span><span>
</span><a name="line-24"></a><span class="hs-identifier">addToAtt</span><span> </span><a name="local-6989586621679064269"><a href="#local-6989586621679064269"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679064269"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">]</span><span>
</span><a name="line-25"></a><span>
</span><a name="line-26"></a><span class="hs-comment">-- | adds given String to List of key-value-pairs (like in 'Attr')</span><span>
</span><a name="line-27"></a><span class="hs-comment">-- in the \&quot;style\&quot;-Key.</span><span>
</span><a name="line-28"></a><span class="hs-comment">--</span><span>
</span><a name="line-29"></a><span class="hs-comment">-- Useful when trying to add CSS-styles directly to (generated) elements</span><span>
</span><a name="line-30"></a><span class="hs-identifier">addToStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-31"></a><span class="hs-comment">-- we are looking for style and inject</span><span>
</span><a name="line-32"></a><a name="addToStyle"><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier">addToStyle</span></a></a><span> </span><a name="local-6989586621679064270"><a href="#local-6989586621679064270"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><a name="local-6989586621679064271"><a href="#local-6989586621679064271"><span class="hs-identifier">val</span></a></a><span class="hs-special">)</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-keyword">if</span><span> </span><a href="#local-6989586621679064270"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">isInfixOf</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679064271"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-keyword">then</span><span> </span><a href="#local-6989586621679064271"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-keyword">else</span><span> </span><a href="#local-6989586621679064271"><span class="hs-identifier hs-var">val</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064270"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">)</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span>
</span><a name="line-33"></a><span class="hs-comment">-- if we land here the current one is not style -&gt; skip</span><span>
</span><a name="line-34"></a><span class="hs-identifier">addToStyle</span><span> </span><a name="local-6989586621679064420"><a href="#local-6989586621679064420"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679064421"><a href="#local-6989586621679064421"><span class="hs-identifier">a</span></a></a><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679064421"><span class="hs-identifier hs-var">a</span></a><span class="hs-glyph">:</span><a href="Text.Pandoc.Util.Filter.html#addToStyle"><span class="hs-identifier hs-var">addToStyle</span></a><span> </span><a href="#local-6989586621679064420"><span class="hs-identifier hs-var">toAdd</span></a><span> </span><span class="hs-keyword">as</span><span>
</span><a name="line-35"></a><span class="hs-comment">-- if we land here we have no more to skip -&gt; add</span><span>
</span><a name="line-36"></a><span class="hs-identifier">addToStyle</span><span> </span><a name="local-6989586621679064423"><a href="#local-6989586621679064423"><span class="hs-identifier">toAdd</span></a></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679064423"><span class="hs-identifier hs-var">toAdd</span></a><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-37"></a><span>
</span><a name="line-38"></a><span class="hs-comment">-- | converts Attributes to String for usage in HTML</span><span>
</span><a name="line-39"></a><span class="hs-comment">--</span><span>
</span><a name="line-40"></a><span class="hs-comment">-- Also converts @width=xxx@ and @height=xxx@ to the</span><span>
</span><a name="line-41"></a><span class="hs-comment">-- corresponding style-attributes</span><span>
</span><a name="line-42"></a><span class="hs-identifier">attToString</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">Attr</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-43"></a><a name="attToString"><a href="Text.Pandoc.Util.Filter.html#attToString"><span class="hs-identifier">attToString</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;&quot;</span><span class="hs-special">,</span><span> </span><a name="local-6989586621679064424"><a href="#local-6989586621679064424"><span class="hs-identifier">classes</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679064425"><a href="#local-6989586621679064425"><span class="hs-identifier">kvpairs</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;class=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679064424"><span class="hs-identifier hs-var">classes</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064427"><a href="#local-6989586621679064427"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679064428"><a href="#local-6989586621679064428"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064427"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064428"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679064426"><span class="hs-identifier hs-var">kvpairs'</span></a><span class="hs-special">)</span><span>
</span><a name="line-44"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-45"></a><span> </span><a name="local-6989586621679064426"><a href="#local-6989586621679064426"><span class="hs-identifier">kvpairs'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;width&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;height&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;transform&quot;</span><span class="hs-special">]</span><span> </span><a href="#local-6989586621679064425"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-46"></a><span class="hs-identifier">attToString</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679064440"><a href="#local-6989586621679064440"><span class="hs-identifier">id'</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679064441"><a href="#local-6989586621679064441"><span class="hs-identifier">classes</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679064442"><a href="#local-6989586621679064442"><span class="hs-identifier">kvpairs</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;id=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064440"><span class="hs-identifier hs-var">id'</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; class=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><a href="#local-6989586621679064441"><span class="hs-identifier hs-var">classes</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot; &quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-identifier hs-var">unwords</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064444"><a href="#local-6989586621679064444"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679064445"><a href="#local-6989586621679064445"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064444"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;=\&quot;&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064445"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;\&quot;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679064443"><span class="hs-identifier hs-var">kvpairs'</span></a><span class="hs-special">)</span><span>
</span><a name="line-47"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-48"></a><span> </span><a name="local-6989586621679064443"><a href="#local-6989586621679064443"><span class="hs-identifier">kvpairs'</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier hs-var">convertToStyle</span></a><span> </span><span class="hs-special">[</span><span class="hs-string">&quot;width&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;height&quot;</span><span class="hs-special">,</span><span class="hs-string">&quot;transform&quot;</span><span class="hs-special">]</span><span> </span><a href="#local-6989586621679064442"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-49"></a><span>
</span><a name="line-50"></a><span class="hs-comment">-- | helper function for 'attToString', but can also be used</span><span>
</span><a name="line-51"></a><span class="hs-comment">-- if you want to extract styles from kv-pair</span><span>
</span><a name="line-52"></a><span class="hs-identifier">convertToStyle</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-53"></a><a name="convertToStyle"><a href="Text.Pandoc.Util.Filter.html#convertToStyle"><span class="hs-identifier">convertToStyle</span></a></a><span> </span><a name="local-6989586621679064446"><a href="#local-6989586621679064446"><span class="hs-identifier">keys</span></a></a><span> </span><a name="local-6989586621679064447"><a href="#local-6989586621679064447"><span class="hs-identifier">kvpairs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">,</span><span> </span><a href="#local-6989586621679064451"><span class="hs-identifier hs-var">newstyle</span></a><span class="hs-special">)</span><span class="hs-glyph">:</span><a href="#local-6989586621679064450"><span class="hs-identifier hs-var">rest</span></a><span>
</span><a name="line-54"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-55"></a><span> </span><a name="local-6989586621679064448"><a href="#local-6989586621679064448"><span class="hs-identifier">oldstyle</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064452"><a href="#local-6989586621679064452"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064452"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><span class="hs-string">&quot;style&quot;</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679064447"><span class="hs-identifier hs-var">kvpairs</span></a><span> </span><span class="hs-keyword">of</span><span>
</span><a name="line-56"></a><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><a name="local-6989586621679064453"><a href="#local-6989586621679064453"><span class="hs-identifier">st</span></a></a><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064453"><span class="hs-identifier hs-var">st</span></a><span>
</span><a name="line-57"></a><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-string">&quot;&quot;</span><span>
</span><a name="line-58"></a><span> </span><a name="local-6989586621679064449"><a href="#local-6989586621679064449"><span class="hs-identifier">stylesToAdd</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064454"><a href="#local-6989586621679064454"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064454"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="#local-6989586621679064446"><span class="hs-identifier hs-var">keys</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679064447"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-59"></a><span> </span><a name="local-6989586621679064450"><a href="#local-6989586621679064450"><span class="hs-identifier">rest</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064455"><a href="#local-6989586621679064455"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><span class="hs-identifier">_</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064455"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-special">`</span><span class="hs-identifier hs-var">notElem</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;style&quot;</span><span class="hs-glyph">:</span><a href="#local-6989586621679064446"><span class="hs-identifier hs-var">keys</span></a><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679064447"><span class="hs-identifier hs-var">kvpairs</span></a><span>
</span><a name="line-60"></a><span> </span><a name="local-6989586621679064451"><a href="#local-6989586621679064451"><span class="hs-identifier">newstyle</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">concat</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><a name="local-6989586621679064456"><a href="#local-6989586621679064456"><span class="hs-identifier">k</span></a></a><span class="hs-special">,</span><a name="local-6989586621679064457"><a href="#local-6989586621679064457"><span class="hs-identifier">v</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064456"><span class="hs-identifier hs-var">k</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;:&quot;</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064457"><span class="hs-identifier hs-var">v</span></a><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><span class="hs-string">&quot;;&quot;</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;$&gt;</span><span> </span><a href="#local-6989586621679064449"><span class="hs-identifier hs-var">stylesToAdd</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">&lt;&gt;</span><span> </span><a href="#local-6989586621679064448"><span class="hs-identifier hs-var">oldstyle</span></a><span>
</span><a name="line-61"></a><span>
</span><a name="line-62"></a><span class="hs-comment">-- | revealjs has some special attributes that has to be</span><span>
</span><a name="line-63"></a><span class="hs-comment">-- passed to the html, but Pandoc only allows</span><span>
</span><a name="line-64"></a><span class="hs-comment">-- @key=value@-attributes, so we have to abuse</span><span>
</span><a name="line-65"></a><span class="hs-comment">-- @.class@ to rewrite them.</span><span>
</span><a name="line-66"></a><span class="hs-comment">--</span><span>
</span><a name="line-67"></a><span class="hs-comment">-- The classes that get rewritten are listed here.</span><span>
</span><a name="line-68"></a><span class="hs-comment">--</span><span>
</span><a name="line-69"></a><span class="hs-comment">-- You probably want 'classToRevealAttr', as that</span><span>
</span><a name="line-70"></a><span class="hs-comment">-- is a wrapper for splitting the class-attribute</span><span>
</span><a name="line-71"></a><span class="hs-identifier">revealjsSpecialAttrs</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-72"></a><a name="revealjsSpecialAttrs"><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier">revealjsSpecialAttrs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span>
</span><a name="line-73"></a><span> </span><span class="hs-special">[</span><span> </span><span class="hs-string">&quot;data-markdown&quot;</span><span>
</span><a name="line-74"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-timing&quot;</span><span>
</span><a name="line-75"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-template&quot;</span><span>
</span><a name="line-76"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-autoplay&quot;</span><span>
</span><a name="line-77"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-prevent-swipe&quot;</span><span>
</span><a name="line-78"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-background-interactive&quot;</span><span>
</span><a name="line-79"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-trim&quot;</span><span>
</span><a name="line-80"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-noescape&quot;</span><span>
</span><a name="line-81"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-ignore&quot;</span><span>
</span><a name="line-82"></a><span> </span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;controls&quot;</span><span>
</span><a name="line-83"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-84"></a><span>
</span><a name="line-85"></a><span class="hs-comment">-- | revealjs has some special attributes that has to be</span><span>
</span><a name="line-86"></a><span class="hs-comment">-- passed to the html, but Pandoc only allows</span><span>
</span><a name="line-87"></a><span class="hs-comment">-- @key=value@-attributes, so we have to abuse</span><span>
</span><a name="line-88"></a><span class="hs-comment">-- @.class@ to rewrite them.</span><span>
</span><a name="line-89"></a><span class="hs-comment">--</span><span>
</span><a name="line-90"></a><span class="hs-comment">-- This is a wrapper-function which just splits the list</span><span>
</span><a name="line-91"></a><span class="hs-comment">-- into real classes and 'revealjsSpecialAttrs'</span><span>
</span><a name="line-92"></a><span class="hs-identifier">classToRevealAttr</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><a name="line-93"></a><a name="classToRevealAttr"><a href="Text.Pandoc.Util.Filter.html#classToRevealAttr"><span class="hs-identifier">classToRevealAttr</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">partition</span><span> </span><span class="hs-special">(</span><span class="hs-special">`</span><span class="hs-identifier hs-var">elem</span><span class="hs-special">`</span><span> </span><a href="Text.Pandoc.Util.Filter.html#revealjsSpecialAttrs"><span class="hs-identifier hs-var">revealjsSpecialAttrs</span></a><span class="hs-special">)</span><span>
</span><a name="line-94"></a><span>
</span><a name="line-95"></a><span class="hs-comment">-- | HTML allows for some attributes (i.e. autoplay)</span><span>
</span><a name="line-96"></a><span class="hs-comment">-- for which revealjs offers a special version</span><span>
</span><a name="line-97"></a><span class="hs-comment">-- (i.e. only autoplaying on active slide).</span><span>
</span><a name="line-98"></a><span class="hs-comment">-- These are the things that get rewritten</span><span>
</span><a name="line-99"></a><span class="hs-identifier">revealjsRewriteAttr</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">String</span><span class="hs-special">]</span><span>
</span><a name="line-100"></a><a name="revealjsRewriteAttr"><a href="Text.Pandoc.Util.Filter.html#revealjsRewriteAttr"><span class="hs-identifier">revealjsRewriteAttr</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><a href="#local-6989586621679064458"><span class="hs-identifier hs-var">replace</span></a><span>
</span><a name="line-101"></a><span> </span><span class="hs-keyword">where</span><span>
</span><a name="line-102"></a><span> </span><span class="hs-identifier">replace</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">String</span><span>
</span><a name="line-103"></a><span> </span><a name="local-6989586621679064458"><a href="#local-6989586621679064458"><span class="hs-identifier">replace</span></a></a><span> </span><a name="local-6989586621679064460"><a href="#local-6989586621679064460"><span class="hs-identifier">a</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier hs-var">filter</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-operator hs-var">==</span><a href="#local-6989586621679064460"><span class="hs-identifier hs-var">a</span></a><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">fst</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679064459"><span class="hs-identifier hs-var">replacements</span></a><span> </span><span class="hs-keyword">of</span><span>
</span><a name="line-104"></a><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><a name="local-6989586621679064473"><a href="#local-6989586621679064473"><span class="hs-identifier">b</span></a></a><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064473"><span class="hs-identifier hs-var">b</span></a><span>
</span><a name="line-105"></a><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><a href="#local-6989586621679064460"><span class="hs-identifier hs-var">a</span></a><span>
</span><a name="line-106"></a><span> </span><span class="hs-identifier">replacements</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">String</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><a name="line-107"></a><span> </span><a name="local-6989586621679064459"><a href="#local-6989586621679064459"><span class="hs-identifier">replacements</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="hs-string">&quot;autoplay&quot;</span><span class="hs-special">,</span><span> </span><span class="hs-string">&quot;data-autoplay&quot;</span><span class="hs-special">)</span><span>
</span><a name="line-108"></a><span> </span><span class="hs-special">]</span><span>
</span><a name="line-109"></a><span>
</span><a name="line-110"></a><span class="hs-comment">-- | small wrapper around @RawInline (Format &quot;html&quot;)@</span><span>
</span><a name="line-111"></a><span class="hs-comment">-- as this is less line-noise in the filters and the</span><span>
</span><a name="line-112"></a><span class="hs-comment">-- intent is more clear.</span><span>
</span><a name="line-113"></a><span class="hs-identifier">toHtml</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Inline</span><span>
</span><a name="line-114"></a><a name="toHtml"><a href="Text.Pandoc.Util.Filter.html#toHtml"><span class="hs-identifier">toHtml</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">RawInline</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Format</span><span> </span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">)</span><span>
</span><a name="line-115"></a><span>
</span><a name="line-116"></a><span>
</span><a name="line-117"></a><span class="hs-comment">-- | small wrapper around @Raw (Format &quot;html&quot;)@</span><span>
</span><a name="line-118"></a><span class="hs-comment">-- as this is less line-noise in the filters and the</span><span>
</span><a name="line-119"></a><span class="hs-comment">-- intent is more clear.</span><span>
</span><a name="line-120"></a><span class="hs-identifier">toBlockHtml</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier hs-type">Block</span><span>
</span><a name="line-121"></a><a name="toBlockHtml"><a href="Text.Pandoc.Util.Filter.html#toBlockHtml"><span class="hs-identifier">toBlockHtml</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">RawBlock</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">Format</span><span> </span><span class="hs-string">&quot;html&quot;</span><span class="hs-special">)</span><span>
</span><a name="line-122"></a></pre></body></html>