module Oldweb::LessHtml

reach into RDoc internals to generate less HTML

Public Instance Methods

accept_heading(heading) click to toggle source
# File lib/oldweb.rb, line 288
def accept_heading(heading)
  level = [6, heading.level].min
  label = heading.label(@code_object)
  @res << "<h#{level}"
  @res << (@options.output_decoration ? "\nid=\"#{label}\">" : ">")
  @res << to_html(heading.text)
  @res << "</h#{level}>"
end
accept_verbatim(verbatim) click to toggle source
# File lib/oldweb.rb, line 284
def accept_verbatim(verbatim)
  @res << "\n<pre>#{CGI.escapeHTML(verbatim.text.rstrip)}</pre>\n"
end