Last active
December 29, 2015 11:19
-
-
Save r38y/7663375 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following to your Gemfile | |
# gem 'rubypants-unicode', '~>0.2.3', require: false | |
begin | |
require 'rubypants-unicode' | |
rescue LoadError => _ | |
abort "Missing dependency 'rubypants-unicode' for RubyPantsFilter." | |
end | |
module HTML | |
class Pipeline | |
class RubyPantsFilter < TextFilter | |
def call | |
RubyPants.new(@text).to_html | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment