diff --git a/lib/chunks/chunk.rb b/lib/chunks/chunk.rb index 9beb0e6c..02b2eb9a 100644 --- a/lib/chunks/chunk.rb +++ b/lib/chunks/chunk.rb @@ -61,7 +61,7 @@ module Chunk end def unmask - @content.sub!(mask, @unmask_text) + @content.sub!(/#{mask}/){|s| s.replace @unmask_text} end def rendered? @@ -73,7 +73,7 @@ module Chunk end def revert - @content.sub!(mask, @text) + @content.sub!(/#{mask}/){|s| s.replace @text} # unregister @content.delete_chunk(self) end