lib/bbcode_filter.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
require 'rubygems' begin require 'bb-ruby' rescue Exception end class BbcodeFilter < Nanoc3::Filter identifier :bbcode def run(content, args) content.bbcode_to_html rescue content end end