more regexp caching

This commit is contained in:
Alexey Verkhovsky 2005-02-04 19:00:28 +00:00
parent 9ea307b9d2
commit ace569ae05
4 changed files with 10 additions and 6 deletions

View file

@ -8,7 +8,8 @@ require 'chunks/chunk'
#
# Category lines can be hidden using ':category: news', for example
class Category < Chunk::Abstract
def self.pattern() return /^(:)?category\s*:(.*)$/i end
CATEGORY_PATTERN = /^(:)?category\s*:(.*)$/i
def self.pattern() CATEGORY_PATTERN end
attr_reader :hidden, :list