Sha256: de549a0c04dbb5ed4542df30d8413f9165cf056fb9ae65ccd4811f6817ba4233

Contents?: true

Size: 386 Bytes

Versions: 14

Compression:

Stored size: 386 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 %(<div class="highlight"><pre class="#{@css_class}"><code>)
        @inner.stream(tokens, &b)
        yield "</code></pre></div>"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/rouge-2.2.1/lib/rouge/formatters/html_pygments.rb
rouge-3.2.1 lib/rouge/formatters/html_pygments.rb
rouge-3.2.0 lib/rouge/formatters/html_pygments.rb
rouge_ecl-1.0.0 lib/rouge/formatters/html_pygments.rb
rouge_ecl-0.0.1 lib/rouge/formatters/html_pygments.rb
rouge-3.1.1 lib/rouge/formatters/html_pygments.rb
rouge-3.1.0 lib/rouge/formatters/html_pygments.rb
rouge-3.0.0 lib/rouge/formatters/html_pygments.rb
rouge-2.2.1 lib/rouge/formatters/html_pygments.rb
rouge-2.2.0 lib/rouge/formatters/html_pygments.rb
rougegal-2.1.2 lib/rouge/formatters/html_pygments.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.1.1/lib/rouge/formatters/html_pygments.rb
rouge-2.1.1 lib/rouge/formatters/html_pygments.rb
rouge-2.1.0 lib/rouge/formatters/html_pygments.rb