class Rouge::Formatters::HTMLLegacy
Transforms a token stream into HTML output.
def initialize(opts={})
(**opts)
-
:wrap
(true/false
) -- -
:inline_theme
(Rouge::CSSTheme
) -- -
:line_numbers
(true/false
) -- -
:css_class
(String
) --
def initialize(opts={}) @formatter = opts[:inline_theme] ? HTMLInline.new(opts[:inline_theme]) : HTML.new @formatter = HTMLTable.new(@formatter, opts) if opts[:line_numbers] if opts.fetch(:wrap, true) @formatter = HTMLPygments.new(@formatter, opts.fetch(:css_class, 'codehilite')) end end
def stream(tokens, &b)
- Yield: - the html output.
def stream(tokens, &b) @formatter.stream(tokens, &b) end