git.iko.soy/typeable/pandoc
on master help sign in
Updated tests.
commit70b4ec95e4d1a565d32c074637bc3e3d203ce729 authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 27 Dec 2011, 18:08 (15 years ago) parent35fc88e
4 files changed+80−73
tests/lhs-test.html+21−23 tests/lhs-test.html+lhs+21−23 tests/lhs-test.latex+27−5 tests/writer.html+11−22
tests/lhs-test.html+21−23
@@ -5,35 +5,33 @@
55 <meta http-equiv="Content-Style-Type" content="text/css" />
66 <meta name="generator" content="pandoc" />
77 <title></title>
8− <style type="text/css">
9−/*<![CDATA[*/
10−table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre
11− { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }
12−td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }
8+<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
9+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
10+table.sourceCode { }
11+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
1312td.sourceCode { padding-left: 5px; }
14−code.sourceCode span.kw { color: #007020; font-weight: bold; }
15−code.sourceCode span.dt { color: #902000; }
16−code.sourceCode span.dv { color: #40a070; }
17−code.sourceCode span.bn { color: #40a070; }
18−code.sourceCode span.fl { color: #40a070; }
19−code.sourceCode span.ch { color: #4070a0; }
20−code.sourceCode span.st { color: #4070a0; }
21−code.sourceCode span.co { color: #60a0b0; font-style: italic; }
22−code.sourceCode span.ot { color: #007020; }
23−code.sourceCode span.al { color: red; font-weight: bold; }
24−code.sourceCode span.fu { color: #06287e; }
25−code.sourceCode span.re { }
26−code.sourceCode span.er { color: red; font-weight: bold; }
27−/*]]>*/
28− </style>
13+code > span.kw { color: #007020; font-weight: bold; }
14+code > span.dt { color: #902000; }
15+code > span.dv { color: #40a070; }
16+code > span.bn { color: #40a070; }
17+code > span.fl { color: #40a070; }
18+code > span.ch { color: #4070a0; }
19+code > span.st { color: #4070a0; }
20+code > span.co { color: #60a0b0; font-style: italic; }
21+code > span.ot { color: #007020; }
22+code > span.al { color: #ff0000; font-weight: bold; }
23+code > span.fu { color: #06287e; }
24+code > span.er { color: #ff0000; font-weight: bold; }
25+</style>
2926</head>
3027<body>
3128<h1 id="lhs-test">lhs test</h1>
3229<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
33−<pre class="sourceCode"><code class="sourceCode haskell"><span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span> <br /> <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
30+<pre class="sourceCode"><code class="sourceCode"><span class="ot">unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d
31+unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>
32+ <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
3433<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p>
35−<pre><code>f *** g = first f &gt;&gt;&gt; second g
36−</code></pre>
34+<pre><code>f *** g = first f &gt;&gt;&gt; second g</code></pre>
3735<p>Block quote:</p>
3836<blockquote>
3937<p>foo bar</p>
tests/lhs-test.html+lhs+21−23
@@ -5,35 +5,33 @@
55 <meta http-equiv="Content-Style-Type" content="text/css" />
66 <meta name="generator" content="pandoc" />
77 <title></title>
8− <style type="text/css">
9−/*<![CDATA[*/
10−table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre
11− { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }
12−td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }
8+<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
9+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
10+table.sourceCode { }
11+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
1312td.sourceCode { padding-left: 5px; }
14−code.sourceCode span.kw { color: #007020; font-weight: bold; }
15−code.sourceCode span.dt { color: #902000; }
16−code.sourceCode span.dv { color: #40a070; }
17−code.sourceCode span.bn { color: #40a070; }
18−code.sourceCode span.fl { color: #40a070; }
19−code.sourceCode span.ch { color: #4070a0; }
20−code.sourceCode span.st { color: #4070a0; }
21−code.sourceCode span.co { color: #60a0b0; font-style: italic; }
22−code.sourceCode span.ot { color: #007020; }
23−code.sourceCode span.al { color: red; font-weight: bold; }
24−code.sourceCode span.fu { color: #06287e; }
25−code.sourceCode span.re { }
26−code.sourceCode span.er { color: red; font-weight: bold; }
27−/*]]>*/
28− </style>
13+code > span.kw { color: #007020; font-weight: bold; }
14+code > span.dt { color: #902000; }
15+code > span.dv { color: #40a070; }
16+code > span.bn { color: #40a070; }
17+code > span.fl { color: #40a070; }
18+code > span.ch { color: #4070a0; }
19+code > span.st { color: #4070a0; }
20+code > span.co { color: #60a0b0; font-style: italic; }
21+code > span.ot { color: #007020; }
22+code > span.al { color: #ff0000; font-weight: bold; }
23+code > span.fu { color: #06287e; }
24+code > span.er { color: #ff0000; font-weight: bold; }
25+</style>
2926</head>
3027<body>
3128<h1 id="lhs-test">lhs test</h1>
3229<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
33−<pre class="sourceCode"><code class="sourceCode haskell">&gt; <span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />&gt; unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span> <br />&gt; <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
30+<pre class="sourceCode"><code class="sourceCode"><span class="fu">&gt;</span><span class="ot"> unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d
31+<span class="fu">&gt;</span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>
32+<span class="fu">&gt;</span> <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
3433<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p>
35−<pre><code>f *** g = first f &gt;&gt;&gt; second g
36−</code></pre>
34+<pre><code>f *** g = first f &gt;&gt;&gt; second g</code></pre>
3735<p>Block quote:</p>
3836<blockquote>
3937<p>foo bar</p>
tests/lhs-test.latex+27−5
@@ -12,6 +12,26 @@
1212 \usepackage[utf8]{inputenc}
1313 \fi
1414\fi
15+\usepackage{color}
16+\usepackage{fancyvrb}
17+\DefineShortVerb[commandchars=\\\{\}]{\|}
18+\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
19+% Add ',fontsize=\small' for more characters per line
20+\newenvironment{Shaded}{}{}
21+\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
22+\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
23+\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
24+\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
25+\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
26+\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
27+\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
28+\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
29+\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
30+\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
31+\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
32+\newcommand{\RegionMarkerTok}[1]{{#1}}
33+\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
34+\newcommand{\NormalTok}[1]{{#1}}
1535\ifxetex
1636 \usepackage[setpagesize=false, % page size defined by xetex
1737 unicode=false, % unicode breaks when used with xetex
@@ -33,11 +53,13 @@
3353\texttt{unsplit} is an arrow that takes a pair of values and combines them to
3454return a single value:
3555
36−\begin{verbatim}
37−unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
38−unsplit = arr . uncurry
39− -- arr (\op (x,y) -> x `op` y)
40−\end{verbatim}
56+\begin{Shaded}
57+\begin{Highlighting}[]
58+\OtherTok{unsplit ::} \NormalTok{(}\DataTypeTok{Arrow} \NormalTok{a) }\OtherTok{=>} \NormalTok{(b }\OtherTok{->} \NormalTok{c }\OtherTok{->} \NormalTok{d) }\OtherTok{->} \NormalTok{a (b, c) d}
59+\NormalTok{unsplit }\FunctionTok{=} \NormalTok{arr }\FunctionTok{.} \FunctionTok{uncurry}
60+ \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y) }
61+\end{Highlighting}
62+\end{Shaded}
4163\texttt{(***)} combines two arrows into a new arrow by running the two arrows
4264on a pair of values (one arrow on the first item of the pair and one arrow on
4365the second item of the pair).
tests/writer.html+11−22
@@ -45,8 +45,7 @@
4545<p>Code in a block quote:</p>
4646<pre><code>sub status {
4747 print &quot;working&quot;;
48−}
49−</code></pre>
48+}</code></pre>
5049<p>A list:</p>
5150<ol style="list-style-type: decimal">
5251<li>item one</li>
@@ -71,13 +70,11 @@ sub status {
7170 print &quot;working&quot;;
7271}
7372
74−this code block is indented by one tab
75−</code></pre>
73+this code block is indented by one tab</code></pre>
7674<p>And:</p>
7775<pre><code> this code block is indented by two tabs
7876
79−These should not be escaped: \$ \\ \&gt; \[ \{
80−</code></pre>
77+These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
8178<hr />
8279<h1 id="lists">Lists</h1>
8380<h2 id="unordered">Unordered</h2>
@@ -274,8 +271,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
274271</dd>
275272<dt><em>orange</em></dt>
276273<dd><p>orange fruit</p>
277−<pre><code>{ orange code block }
278−</code></pre>
274+<pre><code>{ orange code block }</code></pre>
279275<blockquote>
280276<p>orange block quote</p>
281277</blockquote>
@@ -358,11 +354,9 @@ foo
358354<p>This should be a code block, though:</p>
359355<pre><code>&lt;div&gt;
360356 foo
361−&lt;/div&gt;
362−</code></pre>
357+&lt;/div&gt;</code></pre>
363358<p>As should this:</p>
364−<pre><code>&lt;div&gt;foo&lt;/div&gt;
365−</code></pre>
359+<pre><code>&lt;div&gt;foo&lt;/div&gt;</code></pre>
366360<p>Now, nested:</p>
367361<div>
368362 <div>
@@ -387,14 +381,12 @@ Blah
387381-->
388382
389383<p>Code block:</p>
390−<pre><code>&lt;!-- Comment --&gt;
391−</code></pre>
384+<pre><code>&lt;!-- Comment --&gt;</code></pre>
392385<p>Just plain comment, with trailing spaces on the line:</p>
393386<!-- foo -->
394387
395388<p>Code:</p>
396−<pre><code>&lt;hr /&gt;
397−</code></pre>
389+<pre><code>&lt;hr /&gt;</code></pre>
398390<p>Hr’s:</p>
399391<hr>
400392
@@ -517,8 +509,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
517509<p>Indented <a href="/url">twice</a>.</p>
518510<p>Indented <a href="/url">thrice</a>.</p>
519511<p>This should [not][] be a link.</p>
520−<pre><code>[not]: /url
521−</code></pre>
512+<pre><code>[not]: /url</code></pre>
522513<p>Foo <a href="/url/" title="Title with &quot;quotes&quot; inside">bar</a>.</p>
523514<p>Foo <a href="/url/" title="Title with &quot;quote&quot; inside">biz</a>.</p>
524515<h2 id="with-ampersands">With ampersands</h2>
@@ -543,8 +534,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
543534<p>Blockquoted: <a href="http://example.com/"><code class="url">http://example.com/</code></a></p>
544535</blockquote>
545536<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
546−<pre><code>or here: &lt;http://example.com/&gt;
547−</code></pre>
537+<pre><code>or here: &lt;http://example.com/&gt;</code></pre>
548538<hr />
549539<h1 id="images">Images</h1>
550540<p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
@@ -568,8 +558,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
568558<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. <a href="#fnref1" class="footnoteBackLink">↩</a></p></li>
569559<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
570560<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
571−<pre><code> { &lt;code&gt; }
572−</code></pre>
561+<pre><code> { &lt;code&gt; }</code></pre>
573562<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. <a href="#fnref2" class="footnoteBackLink">↩</a></p></li>
574563<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text]. <a href="#fnref3" class="footnoteBackLink">↩</a></p></li>
575564<li id="fn4"><p>In quote. <a href="#fnref4" class="footnoteBackLink">↩</a></p></li>