app/models/chunks/wiki_symbols.rb in Pimki-1.3.092 vs app/models/chunks/wiki_symbols.rb in Pimki-1.4.092

- old
+ new

@@ -1,22 +1,22 @@ - -class WikiSymbol < Chunk::Abstract - def self.pattern() /<:(.*?)>/ end - - attr_accessor :symbol_code - - def initialize(match_data, revision) - super(match_data, revision) - @symbol_code = match_data[1] - end - - def unmask(content) - tag = case symbol_code - when 'cbx' then '<input type="checkbox" disabled />' - when 'cbxc' then '<input type="checkbox" disabled checked />' - else symbol_code - end - - return self if content.gsub!( Regexp.new(mask(content)), tag ) - end -end - + +class WikiSymbol < Chunk::Abstract + def self.pattern() /<:(.*?)>/ end + + attr_accessor :symbol_code + + def initialize(match_data, revision) + super(match_data, revision) + @symbol_code = match_data[1] + end + + def unmask(content) + tag = case symbol_code + when 'cbx' then '<input type="checkbox" disabled />' + when 'cbxc' then '<input type="checkbox" disabled checked />' + else symbol_code + end + + return self if content.gsub!( Regexp.new(mask(content)), tag ) + end +end +