@@ -200,14 +200,14 @@ set_highlight(opt::HighlightOption) = _syntax_highlighting[] = opt
200
200
201
201
function Format. render (io:: IO , :: MIME"text/ansi-debugger" , tokens:: Format.TokenIterator )
202
202
for (str, id, style) in tokens
203
- fg = style. fg. active ? map (Int, (style. fg. r, style. fg. g, style. fg. b)) : : nothing
204
- bg = style. bg. active ? map (Int, (style. bg. r, style. bg. g, style. bg. b)) : : nothing
203
+ fg = style. fg. active ? map (Int, (style. fg. r, style. fg. g, style. fg. b)) : nothing
204
+ bg = style. bg. active ? map (Int, (style. bg. r, style. bg. g, style. bg. b)) : nothing
205
205
crayon = Crayon (
206
206
foreground = fg,
207
207
background = bg,
208
- bold = style. bold ? true : : nothing ,
209
- italics = style. italic ? true : : nothing ,
210
- underline = style. underline ? true : : nothing ,
208
+ bold = style. bold ? true : nothing ,
209
+ italics = style. italic ? true : nothing ,
210
+ underline = style. underline ? true : nothing ,
211
211
)
212
212
if _syntax_highlighting[] == HIGHLIGHT_256_COLORS
213
213
crayon = Crayons. to_256_colors (crayon)
@@ -223,6 +223,7 @@ function highlight_code(code; context=nothing)
223
223
try
224
224
sprint (highlight, MIME (" text/ansi-debugger" ), code, Lexers. JuliaLexer, _current_theme[]; context= context)
225
225
catch e
226
+ rethrow ()
226
227
printstyled (stderr , " failed to highlight code, $e \n " ; color= Base. warn_color ())
227
228
return code
228
229
end
0 commit comments