Pink Shirt
It reverses the HTML back into textile
Usage
text = "This is *my* text."
html = RedCloth.new(text).to_html
same = PinkShirt.new(html).to_textile
same #=> "This is *my* text."
Motivation
I had a problem: some html needed to be textile
None of the available options could get back to exactly where you started.
They weren’t ‘reversable’.
I learned a lot by reading other’s who went before.
I’ve looked at: html2texile
I’ve looked at: clothred
I’ve looked at: a deeply buried module in humpyard
This library still has some problems with whitespace management, but the majority of the the tags convert.
It’s based around textile-spec
and built to produce mirror images of html produced by
RedCloth