more regexp caching
This commit is contained in:
parent
9ea307b9d2
commit
ace569ae05
4 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue