tweaked unmasking (no need to create and compile regexps all the time when sub(string, string) is enough
This commit is contained in:
parent
0d9d89ad3c
commit
dfde41e63e
3 changed files with 5 additions and 3 deletions
|
@ -64,7 +64,9 @@ module WikiChunk
|
|||
class Link < WikiLink
|
||||
def self.pattern() /\[\[([^\]]+)\]\]/ end
|
||||
|
||||
ALIASED_LINK_PATTERN = Regexp.new('^(.*)?\|(.*)$', 0, "utf-8") unless defined? ALIASED_LINK_PATTERN
|
||||
unless defined? ALIASED_LINK_PATTERN
|
||||
ALIASED_LINK_PATTERN = Regexp.new('^(.*)?\|(.*)$', 0, 'utf-8')
|
||||
end
|
||||
|
||||
attr_reader :page_name, :link_text
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue