Sha256: 22f1d32055e54ad7e43f3d806e67bcce1a8adba9b176989f0d0d069c79d35513
Contents?: true
Size: 672 Bytes
Versions: 2
Compression:
Stored size: 672 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/content_processor' webgen_require 'haml' module Webgen class ContentProcessor # Processes content in Haml markup using the +haml+ library. module Haml # Convert the content in +haml+ markup to HTML. def self.call(context) context.content = ::Haml::Engine.new(context.content, :filename => context.ref_node.alcn). render(Object.new, :context => context) context rescue ::Haml::Error => e line = (e.line ? e.line + 1 : Webgen::Error.error_line(e)) raise Webgen::RenderError.new(e, self.class.name, context.dest_node, nil, line) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webgen-1.0.0.beta2 | lib/webgen/content_processor/haml.rb |
webgen-1.0.0.beta1 | lib/webgen/content_processor/haml.rb |