Pricecut 
Pricecut takes your HTML and marks it down.
Installation
Add this line to your application's Gemfile:
gem 'pricecut'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pricecut
Usage
require "pricecut"
html = " <h1>Pricecut is Awesome!</h1>\n\n <p>\n Pricecut lets me take my <strong>HTML</strong> and \n <em>mark it down</em>.\n </p>\n\n <p><img src=\"awesome.png\" alt=\"Awesome\" /></p>\n"
Pricecut.parse(html)
# => # Pricecut is Awesome! #
# Pricecut lets me take my **HTML** and _mark it down_.
# 
Supported Platforms
- Ruby 1.8.7
- Ruby 1.9.3
- JRuby (1.8 mode)
- JRuby (1.9 mode)
- Rubinius (1.8 mode)
- Rubinius (1.9 mode)
TODO
- Decouple
MarkdownVisitor
fromPricecut::Elements
. - Document code.
- Add support for Markdown code blocks.
- Add indentation support.
- Add word-wrap support. (80 characters)
- Make
Pricecut::Elements
classes configurable. (e.g. Use your own custom class for<hr />
if you want.)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright
Copyright (c) 2012 Adam Tanner. See License for details.