Method: Jekyll::Renderer#convert

Defined in:
lib/ngage/jekyll/renderer.rb

#convert(content) ⇒ Object

Convert the document using the converters which match this renderer’s document.

Returns String the converted content.



98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/ngage/jekyll/renderer.rb', line 98

def convert(content)
  converters.reduce(content) do |output, converter|
    begin
      converter.convert output
    rescue StandardError => e
      Jekyll.logger.error "Conversion error:",
                          "#{converter.class} encountered an error while "\
                          "converting '#{document.relative_path}':"
      Jekyll.logger.error("", e.to_s)
      raise e
    end
  end
end