Skip to content

Commit

Permalink
fix(fe): render katex in editor input, output description (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimin9038 authored Oct 16, 2024
1 parent 744a7dc commit 655a6d2
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions apps/frontend/components/EditorDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,17 @@ export function EditorDescription({

<div className="px-6">
<h2 className="mb-3 font-bold">Input</h2>
<div
className="prose prose-invert mb-4 max-w-full text-sm leading-relaxed text-slate-300"
dangerouslySetInnerHTML={{
__html: sanitize(problem.inputDescription)
}}
/>
<div className="prose prose-invert mb-4 max-w-full text-sm leading-relaxed text-slate-300">
<KatexContent content={problem.inputDescription} />
</div>
<hr className="border-slate-700" />
</div>

<div className="px-6">
<h2 className="mb-3 font-bold">Output</h2>
<div
className="prose prose-invert max-w-full text-sm leading-relaxed text-slate-300"
dangerouslySetInnerHTML={{
__html: sanitize(problem.outputDescription)
}}
/>
<div className="prose prose-invert max-w-full text-sm leading-relaxed text-slate-300">
<KatexContent content={problem.outputDescription} />
</div>
</div>

<hr className="border-4 border-[#121728]" />
Expand Down

0 comments on commit 655a6d2

Please sign in to comment.