lib/rouge/tex_theme_renderer.rb in rouge-3.7.0 vs lib/rouge/tex_theme_renderer.rb in rouge-3.8.0
- old
+ new
@@ -111,10 +111,11 @@
def render_blank(tok, &b)
out = "\\expandafter\\def#{token_name(tok)}#1{#1}"
end
def render_style(tok, style, &b)
- out = "\\expandafter\\def#{token_name(tok)}#1{"
+ out = String.new('')
+ out << "\\expandafter\\def#{token_name(tok)}#1{"
out << "\\fboxsep=0pt\\colorbox{#{palette_name(style[:bg])}}{" if style[:bg]
out << '\\textbf{' if style[:bold]
out << '\\textit{' if style[:italic]
out << "\\textcolor{#{palette_name(style[:fg])}}{" if style[:fg]
out << "#1"