Skip to content

graemeworthy/pink_shirt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pink Shirt

wash out all that RedCloth

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

About

HTML to Textile Conversions, built to undo RedCloth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages