Files
news.gitea.happylizard.me/bin/gems/rouge-4.5.1/lib/rouge/formatters/html_pygments.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

19 lines
417 B
Ruby

# frozen_string_literal: true
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