I'm using Markdown with Liquid tags to mark up some code for a Jekyll-generated site and would like to include some code that is both in-line (in a paragraph) and has coloured syntax (with Pygments), but it does not appear to work.
The markup
Lorem ipsum dolor {% highlight javascript %} var sit = "amet"; {% endhighlight %} consectetur adipiscing elit.
results in
<p>Lorem ipsum dolor <div class='highlight'><pre><code class='javascript'> <span class='kd'>var</span> <span class='nx'>sit</span> <span class='o'>=</span> <span class='s2'>"amet"</span><span class='p'>;</span></code></pre></div> consectetur adipiscing elit.</p>
I would very much like highlighted text not be wrapped in <div class='highlight'>
, or at least have it be a <span class='highlight'>
.
Using {% highlight javascript nowrap %}
does not work, as suggested elsewhere. (Perhaps this is an issue with my setup—which is Ruby 2.0, Jekyll 0.12.1, pygments.rb 0.3.7?)
I would like to host this page on GitHub, which means I cannot rely on a plugin. Bummer, right?
Addendum: Line numbering (ie. {% highlight javascript linenos %}
) does not appear to work either. Man.