Set of small filters to facilitate better typography in Rails views. Based of typogrify and includes widon't and quotes. (svn import)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



This is a Ruby copy of Django's Typogrify filters:

Widont was coined by Shaun Inman:

widont_single is taken from <>

Also uses RubyPants Gems <> originally SmartyPants by John Gruber <>

A set of filters to provide typographical hooks to Rails views. Basically a Ruby port of the Typogrify template filters for Django.

I don't know much about Typography, but I do know that curly quotes look better than straight ones, that HTML entities look better than plain-text, and that Django users shouldn't have all the fun.

Included filters (filter name in parentheses):

* Widon't (*widont* also *widont_single* for one-line transformations)
* RubyPants (*rubypants* requires rubypants gem)
* Initial quotes wrapped in class='dquo' or class='quo' depending on if they are single or double (*initial_quotes*)
* Ampersands wrapped in class='amp' (*amp*)
* Multiple adjacent capital letters wrapped in class='caps' (*caps*)
* A do-all filter (*rubyshirt*)
* A do-all filter (*rubyoutfit* aliased as *t* to keep views clean) that runs *rubypants* and *rubyshirt* in that order
* A do-all filter that includes *rubyoutfit* and Rail's *h* function (*th*)

**To get it**, navigate to your Rails root directory

**To use it**, simply add the appropriate function name before your <%=  %> output  
(e.g. change <%= @article %> to <%= rubyshirt @article %>)

svn co vendor/plugins/typography_helper

If you have any suggestions or comments, let me know <>