From a Jekyll post or page, fenced code blocks are parsed as expected, but from a Jekyll collection document, it appears that octopress-codefence is not being invoked at all. Is this a limitation of octopress-codefence or Jekyll?
Given the following fenced codeblock:
``` ruby linenos:false
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
I receive the following HTML output on posts and pages, and I expect to see this output on collections:
``` html
<figure class="code-highlight-figure"><div class="code-highlight"><pre class="code-highlight-pre"><div data-line="1" class="code-highlight-row unnumbered"><div class="code-highlight-line"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
</div></div><div data-line="2" class="code-highlight-row unnumbered"><div class="code-highlight-line"> <span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
</div></div><div data-line="3" class="code-highlight-row unnumbered"><div class="code-highlight-line"><span class="k">end</span>
</div></div><div data-line="4" class="code-highlight-row unnumbered"><div class="code-highlight-line"><span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>
</div></div><div data-line="5" class="code-highlight-row unnumbered"><div class="code-highlight-line"><span class="c1">#=> prints 'Hi, Tom' to STDOUT.</span></div></div></pre></div></figure>
On Jekyll collections, however, this is the HTML output I get:
<p><code>ruby linenos:false
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
</code></p>
This is the output I see in the actual Jekyll collection document that is generated when I use the following configuration in _config.yml:
From a Jekyll post or page, fenced code blocks are parsed as expected, but from a Jekyll collection document, it appears that
octopress-codefence
is not being invoked at all. Is this a limitation ofoctopress-codefence
or Jekyll?Given the following fenced codeblock:
On Jekyll collections, however, this is the HTML output I get:
This is the output I see in the actual Jekyll collection document that is generated when I use the following configuration in
_config.yml
:Thanks in advanced for your help.