Warning: This hasn’t been touched since 2007 and is abandonware!
HpricotPlusUltraviolet.color_syntax('<code lang="ruby">@test</code>') # => '<code class="ultraviolet"><span class="Variable"><span class="Variable">@</span>test</span></code>'
In other words,
color_syntax processes the
<code> element with the
ruby syntax highlighter and turns
Also, all code snippets on this site use this mechanism.
Henrik complained that the library name is too techy… Yes, but I picked the current name to emphasize that it’s just a pat of glue between Hpricot and Ultraviolet.
Hpricot Text GSub is a part of Hpricot Goodies.