class Middleman::Syntax::Formatters::HTML
Public Class Methods
new(opts={})
click to toggle source
# File lib/middleman-syntax/formatters.rb, line 7 def initialize(opts={}) @formatter = if opts[:inline_theme] Rouge::Formatters::HTMLInline.new(opts[:inline_theme]) else Rouge::Formatters::HTML.new end @formatter = Rouge::Formatters::HTMLTable.new(@formatter, opts) if opts[:line_numbers] if opts.fetch(:wrap, true) @formatter = Rouge::Formatters::HTMLPygments.new(@formatter, opts.fetch(:css_class, 'codehilite')) end end
Public Instance Methods
stream(tokens, &block)
click to toggle source
# File lib/middleman-syntax/formatters.rb, line 21 def stream(tokens, &block) @formatter.stream(tokens, &block) end