app/models/chunks/todo.rb in Pimki-1.2.092 vs app/models/chunks/todo.rb in Pimki-1.3.092

- old
+ new

@@ -2,21 +2,22 @@ require 'date' require 'parsedate' # ToDo items. class Todo < Chunk::Abstract - def self.pattern() /todo: ([^\n]+)/i end + def self.pattern() /todo: (.*?)(?=<br|\r|\n|\z)/i end def initialize(match_data, revision) super(match_data, revision) + @text = match_data[1] 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>" ) + "<span class=\"todo\"><strong>TODO:</strong> #{@text}</span>" ) end end