Class: Engines::Textile

Inherits:
MarkupEngine show all
Defined in:
app/models/chunks/engines.rb

Instance Attribute Summary

Attributes inherited from Chunk::Abstract

#revision, #text

Instance Method Summary collapse

Methods inherited from MarkupEngine

pattern, #unmask

Methods inherited from Chunk::Abstract

#initialize, #post_mask, #pre_mask, #revert, #unmask

Constructor Details

This class inherits a constructor from Chunk::Abstract

Instance Method Details

#mask(content) ⇒ Object



15
16
17
18
19
# File 'app/models/chunks/engines.rb', line 15

def mask(content)
  rc = RedCloth.new(text,content.options[:engine_opts])
  rc.rules = [:textile] if RedCloth::VERSION >= '3.0.0'
  rc.to_html
end