Sha256: 7373a9622191d8d839da279cba7794fc8e9bc3fb72979eea0cfff8218083b8af

Contents?: true

Size: 355 Bytes

Versions: 3

Compression:

Stored size: 355 Bytes

Contents

module Rouge
  module Formatters
    class HTMLPygments < Formatter
      def initialize(inner, css_class='codehilite')
        @inner = inner
        @css_class = css_class
      end

      def stream(tokens, &b)
        yield %<<pre class="#@css_class"><code>>
        @inner.stream(tokens, &b)
        yield "</code></pre>"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rouge-2.0.2 lib/rouge/formatters/html_pygments.rb
rouge-2.0.1 lib/rouge/formatters/html_pygments.rb
rouge-2.0.0 lib/rouge/formatters/html_pygments.rb