Closed aronatkins closed 2 years ago
Using an older syntax definition with up-to-date Pandoc (2.17.0.1) successfully parses and adds sourceCode
annotations.
./pandoc-2.17.0.1/bin/pandoc --syntax-definition dockerfile.xml index.md -o index.html
The resulting HTML is similar to what we get with pandoc-2.15:
<p>This is a very minimal <code>Dockerfile</code>:</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode dockerfile"><code class="sourceCode dockerfile"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">FROM</span> ubuntu:bionic</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="kw">RUN</span> apt-get update</span></code></pre></div>
This change appears to correspond with the update to skylighting-0.12.1 in Pandoc-2.16, which contained a Dockerfile
syntax update: https://github.com/jgm/skylighting/commit/22fe4fd34b8d8794046dc448dc77c192dafc3392
Transferring to skylighting.
Note: this only affects two tokenizers: markdown and dockerfile.
Given the Markdown document:
The HTML produced by pandoc-2.16 does not have any
sourceCode
annotations:For comparison, here is the HTML produced by pandoc-2.15: