require 'redcarpet' class ImpressRenderer < Redcarpet::Render::HTML @@attrs = [] @@current = 0 @@head = "" def self.init_with_attrs _attrs, _opts @@attrs = _attrs @@current = 0 @@opts = _opts end def self.set_head head @@head = head end def hrule # this is how we later inject attributes into pages. what an awful hack. @@current += 1 %{
#{code}
"
end
def codespan code
"#{code}
"
end
def mathjax
if @@opts[:latex]
%{
}
end
end
def doc_header
%{
#{self.mathjax}
#{@@head}