Redcarpet integration for HTML::Pipeline.
This was developed with the intention to be a drop-in replacement for HTML::Pipeline's bundled MarkdownPipeline which depends on the unsupported github-markdown
gem. To that end, currently only :autolink
and :fenced_code_blocks
are enabled with Redcarpet's default filter options; future version to add/remove options with a context hash.
Add this line to your application's Gemfile:
gem 'html-pipeline-redcarpet_filter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install html-pipeline-redcarpet_filter
require 'html/pipeline'
require 'html/pipeline/redcarpet_filter'
pipeline = HTML::Pipeline.new [
HTML::Pipeline::RedcarpetFilter
]
input = %(#Food for Thought
> Someone asked, "Do we need so many typefaces?" I replied,
>
> * Do we need so many books?
> * Do we need another painting?
> * Do we need so many songs?
> * Do we need another movie?
>
> -- Bill Dawson)
result = pipeline.call(input)
puts result[:output]
Prints:
<h1>Food for Thought</h1>
<blockquote>
<p>Someone asked, "Do we need so many typefaces?" I replied,</p>
<ul>
<li>Do we need so many books?</li>
<li>Do we need another painting?</li>
<li>Do we need so many songs?</li>
<li>Do we need another movie?</li>
</ul>
<p>-- Bill Dawson</p>
</blockquote>
- Is currently incompatible for use with HTML::Pipeline::RougeFilter.
- Fork it ( https://github.com/bmikol/html-pipeline-redcarpet_filter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Bug reports welcome.
The gem is available as open source under the terms of the MIT License.