Invalid HTML generated when highlighter set to rouge and highlight has option linenos.
For kramdown and redcarpet html is slightly different, but in both cases invalid.
Original markdown:
before
{% highlight cs linenos %}
abc
def
{% endhighlight %}
after
Resulting html for redcarpet:
<p>before</p>
<div class="highlight">
<pre>
<code class="language-cs" data-lang="cs">
<table style="border-spacing: 0">
<tbody>
<tr>
<td class="gutter gl" style="text-align: right">
<pre class="lineno">
1
2
</code>
</pre>
</td>
<td class="code">
<pre>
<span class="n">abc</span>
<span class="n">def</span>
<span class="w"></span>
</pre>
</td>
</tr>
</tbody>
</table>
</pre>
</div>
<p>after</p>
Problem: code closed inside the table.
Resulting html for kramdown:
<p>before</p>
<div class="highlight">
<pre>
<code class="language-cs" data-lang="cs">
<table style="border-spacing: 0">
<tbody>
<tr>
<td class="gutter gl" style="text-align: right">
<pre class="lineno">
1
2
</pre>
</td>
<td class="code">
<pre>
<span class="n">abc</span>
<span class="n">def</span>
<span class="w"></span>
</pre>
</td>
</tr>
</tbody>
</table>
after
</code>
</pre>
</div>
Problem: "after" inside highlighter div block, should be inside p after the block.
Reproduced with:
jekyll 2.1.1 and 2.2.0 (@phocks)
rouge 1.5.1
Invalid HTML generated when highlighter set to rouge and
highlighthas optionlinenos.For kramdown and redcarpet html is slightly different, but in both cases invalid.
Original markdown:
Resulting html for redcarpet:
Problem: code closed inside the table.
Resulting html for kramdown:
Problem: "after" inside highlighter div block, should be inside p after the block.
Reproduced with: