fix(study): 검수함 카드 마크다운+수식 렌더 — 근거/앞면/정답
cards-review view 모드가 cue/cloze/fact/근거를 평문으로 뿌려 표·**굵게**·수식이 raw 노출. cards-study와 동일하게 renderMathMarkdown(근거 블록)·renderMathMarkdownInline(앞면·정답) 적용. 편집모드 textarea는 raw 유지. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
import Button from '$lib/components/ui/Button.svelte';
|
||||
import Skeleton from '$lib/components/ui/Skeleton.svelte';
|
||||
import EmptyState from '$lib/components/ui/EmptyState.svelte';
|
||||
import { renderMathMarkdown, renderMathMarkdownInline } from '$lib/utils/mathMarkdown';
|
||||
|
||||
let loading = $state(true);
|
||||
let groups = $state([]); // [{ source_question_id, question_text, correct_choice, cards: [...] }]
|
||||
@@ -200,18 +201,22 @@
|
||||
{:else}
|
||||
<!-- 보기 모드 -->
|
||||
<div class="rounded-md border border-default bg-surface-active px-3 py-2 text-sm">
|
||||
<div class="text-[10px] font-bold uppercase tracking-wide text-faint">앞</div>{c.cue}
|
||||
<div class="text-[10px] font-bold uppercase tracking-wide text-faint">앞</div>
|
||||
<div class="math-area break-words">{@html renderMathMarkdownInline(c.cue)}</div>
|
||||
</div>
|
||||
<div class="mt-1.5 rounded-md border border-accent-ring bg-bg px-3 py-2 text-sm">
|
||||
{#if c.format === 'cloze' && c.cloze_text}
|
||||
{c.cloze_text}
|
||||
<div class="mt-1 text-xs text-accent">정답: <b>{c.fact}</b></div>
|
||||
<span class="math-area break-words">{@html renderMathMarkdownInline(c.cloze_text)}</span>
|
||||
<div class="mt-1 text-xs text-accent">정답: <b class="math-area break-words">{@html renderMathMarkdownInline(c.fact)}</b></div>
|
||||
{:else}
|
||||
<b class="text-accent">{c.fact}</b>
|
||||
<b class="math-area break-words text-accent">{@html renderMathMarkdownInline(c.fact)}</b>
|
||||
{/if}
|
||||
</div>
|
||||
{#if c.evidence?.length}
|
||||
<div class="mt-2 text-[11px] text-dim">근거: {c.evidence[0].snippet}</div>
|
||||
<div class="mt-2">
|
||||
<span class="text-[10px] font-bold uppercase tracking-wide text-faint">근거</span>
|
||||
<div class="markdown-body math-area mt-1 overflow-x-auto text-[11px] leading-relaxed text-dim">{@html renderMathMarkdown(c.evidence[0].snippet)}</div>
|
||||
</div>
|
||||
{:else if c.source_kind === 'manual'}
|
||||
<div class="mt-2 text-[11px] text-faint">출처: 직접 추가 자료</div>
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user