Sha256: cd5ca1d95c1b730cb97a3b3b2e9525b665dd0d058ad190f9903a8af3d1836af2
Contents?: true
Size: 659 Bytes
Versions: 2
Compression:
Stored size: 659 Bytes
Contents
# -*- encoding: utf-8 -*- module Webgen::ContentProcessor # Processes content in Markdown format using the +maruku+ library. class Maruku # Convert the content in +context+ to HTML. def call(context) require 'maruku' $uid = 0 #fix for invalid fragment ids on second run context.content = ::Maruku.new(context.content, :on_error => :raise).to_html context rescue LoadError raise Webgen::LoadError.new('maruku', self.class.name, context.dest_node.alcn, 'maruku') rescue Exception => e raise Webgen::RenderError.new(e, self.class.name, context.dest_node.alcn, context.ref_node.alcn) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webgen-0.5.10 | lib/webgen/contentprocessor/maruku.rb |
webgen-0.5.9 | lib/webgen/contentprocessor/maruku.rb |