Typogruby integration for HTML::Pipeline.
Currently, all Typogruby's filter options are enabled; future version to add options with a context hash.
Add this line to your application's Gemfile:
gem 'html-pipeline-typogruby_filter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install html-pipeline-typogruby_filter
require 'html/pipeline'
require 'html/pipeline/typogruby_filter'
pipeline = HTML::Pipeline.new [
HTML::Pipeline::MarkdownFilter,
HTML::Pipeline::TypogrubyFilter
]
input = %(Food for Thought & HTML Test:
"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:
<p>Food for Thought <span class="amp">&</span> <span class="caps">HTML</span> Test:</p>
<p><span class="dquo">“</span>Someone asked, ‘Do we need so many typefaces?’ I replied,<br>
Do we need so many books? Do we need another painting? Do we need so many songs? Do we need another movie?” – Bill Dawson</p>
- Fork it ( https://github.com/bmikol/html-pipeline-typogruby_filter/fork )
- Create your featur e 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.