pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

Syntax Highlighting doesn't work on `<code>` tags inside `<pre>` tags #68

Closed marcamillion closed 3 years ago

marcamillion commented 11 years ago

I may be doing something wrong, but the syntax is being highlighted on <code> tags that are not within <pre> tags in my app.

In other words, this works:

<code>std::sort(data, data + arraySize);</code>

But, this doesn't:

<pre class="lang-cpp prettyprint-override"> <code>#include &lt;algorithm&gt; #include &lt;ctime&gt; #include &lt;iostream&gt; int main()</code> </pre>

How do I fix this? Is this an issue you guys are aware of?

Is there a workaround?

Thanks.

slonopotamus commented 3 years ago

Pygments version was updated in #205, please retest.