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 = <<-HTML
<h1>Pricecut is Awesome!</h1>
<p>
Pricecut lets me take my <strong>HTML</strong> and
<em>mark it down</em>.
</p>
<p><img src="awesome.png" alt="Awesome" /></p>
HTML
Pricecut.parse(html)
# => # Pricecut is Awesome! #
# Pricecut lets me take my **HTML** and _mark it down_.
# ![Awesome](awesome.png)
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.