Sha256: 000ec468753ad71c337d973d479eeef2881fe8656558edbcff847c4e6df3ed35
Contents?: true
Size: 501 Bytes
Versions: 2
Compression:
Stored size: 501 Bytes
Contents
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 Exception => e raise RuntimeError, "Maruku to HTML conversion failed: #{e.message}", e.backtrace end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webgen-0.5.1 | lib/webgen/contentprocessor/maruku.rb |
webgen-0.5.2 | lib/webgen/contentprocessor/maruku.rb |