Method: Slimi::Filters::OutputProtector#unprotect

Defined in:
lib/slimi/filters/embedded.rb

#unprotect(text) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



56
57
58
59
60
61
62
63
64
# File 'lib/slimi/filters/embedded.rb', line 56

def unprotect(text)
  block = [:multi]
  while text =~ /#{@tag}/
    block << [:static, Regexp.last_match.pre_match]
    block << @protect.shift
    text = Regexp.last_match.post_match
  end
  block << [:static, text]
end