mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-21 08:41:37 +00:00
Omit the wrapper sourceCode divs added by pandoc around code blocks. More intelligently identify which class to use for the one class allowed in GFM code blocks. If there is a class of form `language-X`, use `X`; otherwise use the first class other than `sourceCode`. Closes #10926.
513 B
513 B
% pandoc -f html -t gfm
<div class="sourceCode" id="cb1"><pre
class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test</span></span></code></pre></div>
^D
``` ruby
test
```
% pandoc -f html -t gfm
<pre
class="border language-ruby"><code class="sourceCode ruby"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test</span></span></code></pre>
^D
``` ruby
test
```