Skip to content

Commit

Permalink
fix: slangroom error now are rendered with the correct background and…
Browse files Browse the repository at this point in the history
… foreground colors (#11)
  • Loading branch information
matteo-cristino authored Jul 23, 2024
1 parent d936c2d commit 50505cb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ function ErrorRenderer(props: { error: SlangroomError }) {
}
}

// bg-slate-100 -> #F1F5F9
// text-slate-800 -> #1E293B
function AnsiRenderer(props: { text: string; className?: string }) {
const { text, className = '' } = props;
const converter = new Convert();
const converter = new Convert({bg: '#F1F5F9', fg: '#1E293B'});
return <pre class={className} innerHTML={converter.toHtml(text)}></pre>;
}

Expand Down

0 comments on commit 50505cb

Please sign in to comment.