Class: PinkShirt
- Inherits:
-
Object
- Object
- PinkShirt
- Defined in:
- lib/pink_shirt.rb,
lib/pink_shirt/sax.rb,
lib/pink_shirt/output.rb,
lib/pink_shirt/version.rb,
lib/pink_shirt/entities.rb,
lib/pink_shirt/sax/base.rb,
lib/pink_shirt/sax/basic.rb,
lib/pink_shirt/sax/links.rb,
lib/pink_shirt/sax/lists.rb,
lib/pink_shirt/attributes.rb,
lib/pink_shirt/sax/images.rb,
lib/pink_shirt/sax/script.rb,
lib/pink_shirt/sax/tables.rb,
lib/pink_shirt/sax/acronym.rb,
lib/pink_shirt/sax/block_level.rb,
lib/pink_shirt/sax/boiler_plate.rb,
lib/pink_shirt/sax/preformatted.rb
Overview
An html2textile converter PinkShirt Undoes RedCloth
Usage
html = "stuff <b>goood</b> stuff"
PinkShirt.new('stuff').to_textile
Internals
PinkShirt uses a sax parser built on nokogiri
Defined Under Namespace
Classes: Attributes, Entities, Flags, Output, SAX
Constant Summary collapse
- VERSION =
"0.0.6"
Instance Method Summary collapse
-
#initialize(html) ⇒ PinkShirt
constructor
A new instance of PinkShirt.
-
#to_textile ⇒ Object
renders to textile.
Constructor Details
Instance Method Details
#to_textile ⇒ Object
renders to textile
24 25 26 27 28 29 |
# File 'lib/pink_shirt.rb', line 24 def to_textile @parser.parse(@html)do |config| config.replace_entities = false end @sax_syntax.to_textile end |