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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user