lib/jekyll-liquify.rb in jekyll-liquify-0.0.2 vs lib/jekyll-liquify.rb in jekyll-liquify-0.0.3
- old
+ new
@@ -1,9 +1,15 @@
require 'redcarpet'
-module LiquidFilter
- def liquify(input)
- Liquid::Template.parse(input).render(@context)
+module Jekyll
+ module LiquifyFilter
+ def liquify(input)
+ if input.is_a? String
+ Liquid::Template.parse(input).render(@context)
+ else
+ input
+ end
+ end
end
end
Liquid::Template.register_filter(LiquidFilter)