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
|
@ -116,7 +116,7 @@ class URIChunk < Chunk::Abstract
|
|||
# content.
|
||||
def unmask(content)
|
||||
return nil if escaped_text
|
||||
return self if content.sub!( Regexp.new(mask(content)), "<a href=\"#{uri}\">#{link_text}</a>" )
|
||||
return self if content.sub!(mask(content), "<a href=\"#{uri}\">#{link_text}</a>")
|
||||
end
|
||||
|
||||
# If there is no hostname in the URI, do not render it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue