fix: use correct Unicode minus sign (−) for subtraction operator checks

**Bug:** Subtraction problems were not getting their operator-specific display
rules in mixed mode because we were checking for ASCII hyphen '-' instead of
Unicode minus sign '−' (U+2212).

**Result:** All subtraction problems were falling back to default displayRules
instead of using subtractionDisplayRules, causing zero scaffolding.

**Fix:** Changed operator checks from '-' to '−' to match SubtractionProblem type.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-11-10 14:49:03 -06:00
parent 5971f231ec
commit 0dd9e45952

View File

@@ -78,7 +78,7 @@ function generatePageTypst(
`[TYPST PROBLEM ${index}] Using additionDisplayRules for ${p.a} + ${p.b}`,
rulesForProblem
)
} else if (p.operator === '-' && masteryConfig.subtractionDisplayRules) {
} else if (p.operator === '' && masteryConfig.subtractionDisplayRules) {
rulesForProblem = masteryConfig.subtractionDisplayRules
console.log(
`[TYPST PROBLEM ${index}] Using subtractionDisplayRules for ${p.minuend} - ${p.subtrahend}`,
@@ -89,7 +89,7 @@ function generatePageTypst(
const displayOptions = resolveDisplayForProblem(rulesForProblem, meta)
if (p.operator === '-') {
if (p.operator === '') {
console.log(`[TYPST PROBLEM ${index}] Subtraction resolved display:`, {
problem: `${p.minuend} - ${p.subtrahend}`,
meta,