[Radiant] Syntax Highlighting

Sean Cribbs seancribbs at gmail.com
Tue Jul 15 09:33:30 CDT 2008


Josh,

No, but you can steal my CSS styles: 
http://seancribbs.com/stylesheets/code.css

Sean

Josh Schairbaum wrote:
> Sean,
>
> That's sharp.  I love the fact that it's unobtrusive and seems much 
> more accessible for customization than some of the others.  Thanks for 
> pointing it out.  Have you written a regex for anything?
>
> Regards,
> Josh
>
> On Jul 15, 2008, at 10:01 AM, Sean Cribbs wrote:
>
>> It's not perfect, but I like using Dan Webb's Syntax Highlighter 
>> (JavaScript).  Just put your source code inside <code> tags with the 
>> class of the language you want, like so:
>>
>> <code class="ruby">puts "Hello, World!"</code>
>>
>> You can download it at http://danwebb.net.
>>
>> Sean
>>
>> Josh Schairbaum wrote:
>>> Is anyone using the syntax_highlighting extension?  
>>> http://github.com/marcoow/syntax_highlighting/tree/master
>>>
>>> It seems to be doing the parsing, but when it renders in a page, 
>>> it's strictly as "code" html, so all the <span> tags that input as 
>>> part of it are rendered as well.
>>>
>>> For example,
>>>
>>> <r:code language="python">
>>>  import pygments
>>>  foo = "bar"
>>> </r:code>
>>>
>>> renders as:
>>>
>>> <span class="k">import</span> <span class="nn">pygments</span>  
>>> <span class="n">foo</span> <span class="o">=</span> <span 
>>> class="n">"bar"</span>
>>>
>>> Any ideas?  There is currently no filter set on the page, and if I 
>>> set it to "textile" all the < & > get turned to &lt; & &gt;, 
>>> respectively.
>>>
>>> Is there another option for syntax highlighting?  I would like to 
>>> have more languages than code_ray currently supports.
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant at radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant at radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>



More information about the Radiant mailing list