diff --git a/lib/jekyll/blocks.rb b/lib/jekyll/blocks.rb new file mode 100644 index 000000000..70ae6b02d --- /dev/null +++ b/lib/jekyll/blocks.rb @@ -0,0 +1,15 @@ +module Jekyll + class Highlight < Liquid::Block + include Liquid::StandardFilters + + def initialize(tag_name, lang, tokens) + super + @lang = lang.strip + end + + def render(context) + "
#{escape(super)}"
+ end
+ end
+end
+Liquid::Template.register_tag('highlight', Jekyll::Highlight)
\ No newline at end of file