Sha256: 136188b7480d3d55a814ef987fe21adfd4eea2862be6bff1eb0b37e06c8ae670

Contents?: true

Size: 357 Bytes

Versions: 7

Compression:

Stored size: 357 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

7 entries across 6 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rouge-2.0.7/lib/rouge/formatters/html_pygments.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.0.7/lib/rouge/formatters/html_pygments.rb
tdiary-5.0.4 vendor/bundle/gems/rouge-2.0.7/lib/rouge/formatters/html_pygments.rb
rouge-2.0.7 lib/rouge/formatters/html_pygments.rb
rouge-2.0.6 lib/rouge/formatters/html_pygments.rb
rouge-2.0.5 lib/rouge/formatters/html_pygments.rb
rouge-2.0.3 lib/rouge/formatters/html_pygments.rb