From 0dd9e459526d784e83e50a0f8668d809bb01fa57 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Mon, 10 Nov 2025 14:49:03 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20use=20correct=20Unicode=20minus=20sign?= =?UTF-8?q?=20(=E2=88=92)=20for=20subtraction=20operator=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **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 --- apps/web/src/app/create/worksheets/addition/typstGenerator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/create/worksheets/addition/typstGenerator.ts b/apps/web/src/app/create/worksheets/addition/typstGenerator.ts index d6e4b54b..f52b8c26 100644 --- a/apps/web/src/app/create/worksheets/addition/typstGenerator.ts +++ b/apps/web/src/app/create/worksheets/addition/typstGenerator.ts @@ -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,