Hi, I have a problem that I can't explain.

I am using the Coderay plugin for syntax highlighting but I see different results if I render it within a page part or within the body.


I am using this:

<notextile>
<r:code language="c" line_numbers="true" textile="true">
    ...
    int ercd;
    ...
    ercd=call_func(num);
    ...
</r:code>
</notextile>

If I put this into the "body" part, it all works fine. If I put it under a part called "csamples", it renders extra <br /> at the end of each line.

From body:
<div class="CodeRay">
  <div class="code"><pre><span class="no">1</span> ...
<span class="no">2</span>     int ercd;
<span class="no">3...

From page part:
 <div class="code"><pre><span class="no">1</span> &#8230;<br />
<span class="no">2</span>     int ercd; <br />
...

Both parts are using Textile as the filter and the page part is rendered using:
<r:if_content part="csamples"><r:content part="csamples" /></r:if_content>

Any idea what could be going on? Or, is there something else preferred for syntax highlighting, mostly for C code.

Best Regards,
Mohit.
22/1/2013 | 1:43 AM.

Reply via email to