Question card options show LaTeX as raw source, though the question text renders it

オープン 初心者向け
#35,480 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

ComposerPendingUserInputPanel.tsxから始めます。質問テキストは261行目あたりでChatMarkdownを通りますが、option.labelとoption.descriptionは294〜302行目あたりのプレーンなspanテキストです。ChatMarkdownでMarkdownMathがどのように適用されているか、オプションのフィールドにも同じ経路を使えるかを確認してください。Render mathがオンのときに$...$を含む質問オプションが数式として組版され、プレーンなオプションは引き続き変更なく表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

[!NOTE]
🤖 Drafted by Claude on behalf of a T3 Code user

Area

apps/web, ComposerPendingUserInputPanel.tsx (as of 65057562b)

What happens

With Settings → Appearance → Render math on, a question card (AskUserQuestion) typesets LaTeX in the question text but shows it as raw source in every option label and description.

Steps to reproduce
  1. Turn on Render math.
  2. Have the agent ask a question whose text and options both contain math, e.g. question What does $\sum_{n=1}^{\infty} \frac{1}{2^n}$ equal? with options $1$, $2$, $\frac{1}{2}$, $+\infty$.
Expected

Options typeset like the question does.

Actual

The question renders correctly. The options show $\frac{1}{2}$ and similar raw source.

Likely cause

The question goes through <ChatMarkdown> (line ~261). option.label and option.description are rendered as plain <span> text (lines ~294–302), so they never reach MarkdownMath.

Why it matters

I use question cards for multiple-choice study drills (maths). The options are where the math lives, so the card can't be used for STEM quizzes without workarounds.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
59分
マージ済み PR(30日)
418

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。