Class: RedCloth::TextileDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/red_cloth_formatters_plain.rb

Instance Method Summary collapse

Instance Method Details

#to_plain(*rules) ⇒ Object



228
229
230
231
232
233
234
235
# File 'lib/red_cloth_formatters_plain.rb', line 228

def to_plain(*rules)
  apply_rules(rules)
  output = to(Formatters::Plain)
  output = Formatters::Plain::Sanitizer.strip_tags(output)
  # replace special link hooks with < and >
  # See #RedCloth::Formatters::Plain#link above
  output.gsub("!LINK_OPEN_TAG!", "<").gsub("!LINK_CLOSE_TAG!", ">")
end