Sha256: c1b0d3cc62866fc816af42f616c0616d46b691fe737cd6ef8be579a9ebd0f587
Contents?: true
Size: 467 Bytes
Versions: 5
Compression:
Stored size: 467 Bytes
Contents
# -*- encoding: utf-8 -*- module Webgen::ContentProcessor # Processes content in Markdown markup with the fast +rdiscount+ library. class RDiscount # Convert the content in +context+ to HTML. def call(context) require 'rdiscount' context.content = ::RDiscount.new(context.content).to_html context rescue LoadError raise Webgen::LoadError.new('rdiscount', self.class.name, context.dest_node, 'rdiscount') end end end
Version data entries
5 entries across 5 versions & 1 rubygems