Method: Webby::Renderer#_guard

Defined in:
lib/webby/renderer.rb

#_guard(str) ⇒ Object

This method will put filter guards around the given input string. This will protect the string from being processed by any remaining filters (specifically the textile filter).

The string is returned unchanged if there are no remaining filters to guard against.



369
370
371
372
373
374
375
376
# File 'lib/webby/renderer.rb', line 369

def _guard( str )
  return str unless @_cursor

  if @_cursor.remaining_filters.include? 'textile'
    str = "<notextile>\n%s\n</notextile>" % str
  end
  str
end