Sha256: e921b4c7ad1e02e1f811b8f969bdbf78b784731ae1fcd244389ce5d0b728f8f6

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

require 'chunks/wiki'
require 'date'
require 'parsedate'

# ToDo items.
class Todo < Chunk::Abstract
  def self.pattern() /todo: ([^\n]+)/i end

  def initialize(match_data, revision)
    super(match_data, revision)
  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.
      "<span class=\"todo\"><strong>TODO:</strong> #{@text.gsub(/todo:\s*/, '')}</span>" )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Pimki-1.1.092 app/models/chunks/todo.rb
Pimki-1.2.092 app/models/chunks/todo.rb