require 'redcarpet' class ImpressRenderer < Redcarpet::Render::HTML @@attrs = [] @@current = 0 @@author, @@head, @@title = nil def self.init_with_attrs _attrs, _opts @@attrs = _attrs @@current = 0 @@opts = _opts end def self.author= author @@author = "" end def self.head= head @@head = head end def self.title= title @@title = "
#{code}
"
end
def codespan code
"#{code}
"
end
def mathjax
if @@opts[:latex]
%{
}
end
end
def doc_header
%{
#{@@title}
#{@@author}
#{self.mathjax}
#{@@head}