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
|
@ -27,5 +27,5 @@ class NoWiki < Chunk::Abstract
|
|||
# The nowiki content is not unmasked. This means the chunk will be reverted
|
||||
# using the plain text.
|
||||
def unmask(content) nil end
|
||||
def revert(content) content.sub!( Regexp.new(mask(content)), plain_text ) end
|
||||
def revert(content) content.sub!(mask(content), plain_text) end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue