Repository navigation
Matching | Render LaTeX in answer choice chips - #81
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
@coderrabbit review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Matching suggested answers with
$$...$$now render as math on the choice chips and on the selected card. Scoring still compares the raw suggested-answer string to[[blank:...]].Changes
Matching choices used
textContent, so learners saw dollar signs instead of formulas. The parser now includeschoicesHtmlfor each chip.choicesstays the raw string so blank matching is unchanged.The chip is a flex
.button. Chrome treated the sentence and the KaTeX tree as sibling flex items, which wrapped into two columns and splity=x^2. Content now sits in a single.matching-choice-labelblock, and the formula iswhite-space: nowrap.Testing
npm testnpm run examples, openmatching-latex-chips.md$$y=x^2$$