I want syntax highlighting
-
James Adam
- Tag set to code, renderer, ruby, syntax
- Milestone set to 0.6
-
James Adam
- State changed from new to resolved
Kindof works now, thanks to a hackety dyna:
require 'syntax/convertors/html' class CodeHighlighter < Dynasnip def handle(language, snip_to_render, part_to_render='content') snip = Vanilla.snip(snip_to_render) text = snip.__send__(part_to_render.to_sym) convertor = Syntax::Convertors::HTML.for_syntax(language) code = convertor.convert(text, false) %(<pre class="code ) + language + %("><code>) + code + %(</code></pre>) end self end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.