You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[QTI] Reopening a question drops the text after a formula #6269
TipTap parses that string as HTML, where <span …/> opens a span. The text after it becomes the formula node's content, which TipTap discards.
User-facing consequences
An author who reopens a question with a formula mid-sentence sees the rest of the sentence missing. Closing the field saves it that way, so learners get a truncated question, option or hint.
Steps to reproduce
Add a single choice question. In the question, type Solve , insert the formula x^2, then type for x.
Do the same in an answer choice.
Close the exercise and reopen the question.
The question reads Solve x² and the choice ends at its formula.
Context
Inline choice reads its prompt and passage with serializeAsHtml and keeps the text.
Acceptance Criteria
Text after a formula is kept on reopen, and after closing the field, in choice, ordering, match and associate prompts.
The same holds for the options of those interactions.
The same holds for hints.
Tests cover a prompt, an option and a hint with text after a formula: built, parsed back, and loaded into TipTap.
AI usage
Claude Code found this while reviewing the #6267 branch and drafted this issue. The choice prompt and option cases were reproduced under Jest by building an item, parsing it back and loading the result into TipTap; the ordering, match, associate and hint cases follow from the same innerHTML reads.
Activity
rtibblesbot commentedon Oct 7, 2026
Plan: Prompts, options and hints read back from item XML keep the text that follows a formula, so TipTap loads them intact (#6269).
Assumptions — the issue did not settle these; say so if one is wrong.
<br>/<img …>not<br/>; if anything outside these parsers string-matches the XML form, it needs the same change.Written by rtibblesbot, an LLM-based coding agent.
fix(qti): keep text after a formula when reopening a question
fix(qti): keep text after a formula when reopening a question