HighlightFu is a syntax highlighting plugin that adds helper methods to your views. It searches for a <pre lang=”[lang]>[code]</pre> html tag and replaces it with the syntax highlighting code. The syntax highlighting is done using dp.SyntaxHighlighter. I’ve developed HighlightFu because I was not satisfied with the previous syntax highlighting plugin I made.
script/plugin install http://svn.munitic.com.hr/plugins/highlight_fu
<%= highlight_stylesheet_link_tag -%> and <%= highlight_javascript_include_tag -%><%= highlight @post.body -%><%= highlight_initialize -%>UPDATE: I refactored the plugin, especially the private make_options function and merged stylesheet and javascript helper into one called highlight_include_assets. The result is that the code is cleaner and the plugin is easier to use. Now step 2 in the usage paragraph is just one line of code and that is:
<%= highlight_include_assets -%>
UPDATE2: I’ve moved the code to google. So now you can get the latest version with:
script/plugin install http://highlightfu.googlecode.com/svn/trunk
Posted in Rails,
0 Comments
Comments
COMMENTS ARE DISABLED

Full name: Ivica Munitic
Age: 28
Profession: Developer
Email: ivica@munitic.com.hr