require 'chunks/wiki' require 'date' require 'parsedate' # ToDo items. class Todo < Chunk::Abstract def self.pattern() /todo: ([^\n]+)/i end def initialize(match_data) super(match_data) end def escaped_text() nil end def unmask(content) return self if content.gsub!( Regexp.new(mask(content)), # the style 'todo' is bright-red to be eye catching. It is not expected that # there will be too many items on one page, but each is supposed to stand out. # The ToDo special page differentiates between the 'todo' and 'todoFuture' styles. "TODO: #{@text.gsub(/todo:\s*/, '')}" ) end end