git.iko.soy/typeable/pandoc
on master help sign in
Use skylighting 0.4.2.

This prevents the problem with extra space around highlighted code blocks (closes #3996). Note that we no longer put an enclosing div around highlighted code blocks. The pre is the outer element, just as for unhighlighted blocks.

commit76886678a6be4db6e8e60ade514710bfe3e62b28 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 26 Oct 2017, 15:57 (9 years ago) parent9ff04a9
4 files changed+13−15
pandoc.cabal+2−2 stack.yaml+1−1 test/lhs-test.html+5−6 test/lhs-test.html+lhs+5−6
pandoc.cabal+2−2
@@ -318,7 +318,7 @@ library
318318 tagsoup >= 0.13.7 && < 0.15,
319319 base64-bytestring >= 0.1 && < 1.1,
320320 zlib >= 0.5 && < 0.7,
321− skylighting >= 0.4 && <0.5,
321+ skylighting >= 0.4.2 && <0.5,
322322 data-default >= 0.4 && < 0.8,
323323 temporary >= 1.1 && < 1.3,
324324 blaze-html >= 0.5 && < 0.10,
@@ -556,7 +556,7 @@ test-suite test-pandoc
556556 filepath >= 1.1 && < 1.5,
557557 hslua >= 0.9 && < 0.10,
558558 process >= 1.2.3 && < 1.7,
559− skylighting >= 0.4 && < 0.5,
559+ skylighting >= 0.4.2 && < 0.5,
560560 temporary >= 1.1 && < 1.3,
561561 Diff >= 0.2 && < 0.4,
562562 tasty >= 0.11 && < 0.12,
stack.yaml+1−1
@@ -9,7 +9,7 @@ packages:
99extra-deps:
1010- pandoc-types-1.17.2
1111- hslua-0.9.2
12−- skylighting-0.4.1
12+- skylighting-0.4.2
1313- cmark-gfm-0.1.1
1414- QuickCheck-2.10.0.1
1515- tasty-quickcheck-0.9.1
test/lhs-test.html+5−6
@@ -12,7 +12,6 @@
1212 .column{display: inline-block;}
1313 </style>
1414 <style type="text/css">
15−div.sourceCode { overflow-x: auto; }
1615div.sourceLine, a.sourceLine { display: inline-block; min-height: 1.25em; }
1716a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
1817.sourceCode { overflow: visible; }
@@ -21,9 +20,9 @@ code.sourceCode { white-space: pre; }
2120code.sourceCode { white-space: pre-wrap; }
2221div.sourceLine, a.sourceLine { text-indent: -1em; padding-left: 1em; }
2322}
24−.numberSource div.sourceLine, .numberSource a.sourceLine
23+pre.numberSource div.sourceLine, .numberSource a.sourceLine
2524 { position: relative; }
26−.numberSource div.sourceLine::before, .numberSource a.sourceLine::before
25+pre.numberSource div.sourceLine::before, .numberSource a.sourceLine::before
2726 { content: attr(data-line-number);
2827 position: absolute; left: -5em; text-align: right; vertical-align: baseline;
2928 border: none; pointer-events: all;
@@ -31,7 +30,7 @@ div.sourceLine, a.sourceLine { text-indent: -1em; padding-left: 1em; }
3130 -khtml-user-select: none; -moz-user-select: none;
3231 -ms-user-select: none; user-select: none;
3332 padding: 0 4px; width: 4em; }
34−.numberSource pre.sourceCode { margin-left: 3em; border-left: 1px solid #aaaaaa; color: #aaaaaa; padding-left: 4px; }
33+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; color: #aaaaaa; padding-left: 4px; }
3534@media screen {
3635a.sourceLine::before { text-decoration: underline; color = initial; }
3736}
@@ -73,9 +72,9 @@ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Infor
7372<h1 id="lhs-test">lhs test</h1>
7473<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to
7574return a single value:</p>
76−<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><div class="sourceLine" id="1" href="#1" data-line-number="1"><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</div>
75+<pre class="sourceCode literate haskell"><code class="sourceCode haskell"><div class="sourceLine" id="1" href="#1" data-line-number="1"><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</div>
7776<div class="sourceLine" id="2" href="#2" data-line-number="2">unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry</div>
78−<div class="sourceLine" id="3" href="#3" data-line-number="3"> <span class="co">-- arr (\op (x,y) -&gt; x `op` y)</span></div></code></pre></div>
77+<div class="sourceLine" id="3" href="#3" data-line-number="3"> <span class="co">-- arr (\op (x,y) -&gt; x `op` y)</span></div></code></pre>
7978<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a
8079pair of values (one arrow on the first item of the pair and one arrow on the
8180second item of the pair).</p>
test/lhs-test.html+lhs+5−6
@@ -12,7 +12,6 @@
1212 .column{display: inline-block;}
1313 </style>
1414 <style type="text/css">
15−div.sourceCode { overflow-x: auto; }
1615div.sourceLine, a.sourceLine { display: inline-block; min-height: 1.25em; }
1716a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
1817.sourceCode { overflow: visible; }
@@ -21,9 +20,9 @@ code.sourceCode { white-space: pre; }
2120code.sourceCode { white-space: pre-wrap; }
2221div.sourceLine, a.sourceLine { text-indent: -1em; padding-left: 1em; }
2322}
24−.numberSource div.sourceLine, .numberSource a.sourceLine
23+pre.numberSource div.sourceLine, .numberSource a.sourceLine
2524 { position: relative; }
26−.numberSource div.sourceLine::before, .numberSource a.sourceLine::before
25+pre.numberSource div.sourceLine::before, .numberSource a.sourceLine::before
2726 { content: attr(data-line-number);
2827 position: absolute; left: -5em; text-align: right; vertical-align: baseline;
2928 border: none; pointer-events: all;
@@ -31,7 +30,7 @@ div.sourceLine, a.sourceLine { text-indent: -1em; padding-left: 1em; }
3130 -khtml-user-select: none; -moz-user-select: none;
3231 -ms-user-select: none; user-select: none;
3332 padding: 0 4px; width: 4em; }
34−.numberSource pre.sourceCode { margin-left: 3em; border-left: 1px solid #aaaaaa; color: #aaaaaa; padding-left: 4px; }
33+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; color: #aaaaaa; padding-left: 4px; }
3534@media screen {
3635a.sourceLine::before { text-decoration: underline; color = initial; }
3736}
@@ -73,9 +72,9 @@ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Infor
7372<h1 id="lhs-test">lhs test</h1>
7473<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to
7574return a single value:</p>
76−<div class="sourceCode"><pre class="sourceCode literate literatehaskell"><code class="sourceCode literatehaskell"><div class="sourceLine" id="1" href="#1" data-line-number="1"><span class="ot">&gt; 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</div>
75+<pre class="sourceCode literate literatehaskell"><code class="sourceCode literatehaskell"><div class="sourceLine" id="1" href="#1" data-line-number="1"><span class="ot">&gt; 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</div>
7776<div class="sourceLine" id="2" href="#2" data-line-number="2"><span class="ot">&gt;</span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry</div>
78−<div class="sourceLine" id="3" href="#3" data-line-number="3"><span class="ot">&gt;</span> <span class="co">-- arr (\op (x,y) -&gt; x `op` y)</span></div></code></pre></div>
77+<div class="sourceLine" id="3" href="#3" data-line-number="3"><span class="ot">&gt;</span> <span class="co">-- arr (\op (x,y) -&gt; x `op` y)</span></div></code></pre>
7978<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a
8079pair of values (one arrow on the first item of the pair and one arrow on the
8180second item of the pair).</p>