Sha256: 0efa1ed2f52e7b462682fbb60a33c47a68dd19eac9f010d8a65c7361bb6f4af4
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 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 "Maruku to HTML conversion failed: #{e.message}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webgen-0.5.0 | lib/webgen/contentprocessor/maruku.rb |