Refactored Diff::Display classes
[gitorious:yousource.git] / lib / gitorious / diff / base_callback.rb
1 module Gitorious
2   module Diff
3     class BaseCallback < ::Diff::Renderer::Base
4       def headerline(line); end
5       def new_line; end
6       
7       protected
8         def escape(text)
9           text.gsub('&', '&amp;').
10             gsub('<', '&lt;').
11             gsub('>', '&gt;').
12             gsub('"', '&#34;')
13         end
14     end
15   end
16 end