Tutor/answers: bare subscripts (S_n, a_1) become Unicode; migration 0022 re-cleans DB text
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,3 +23,11 @@ class HistoryNeverShowsLatexTests(TestCase):
|
||||
self.assertNotIn('^', t)
|
||||
self.assertNotIn('$', t)
|
||||
self.assertIn('x²', texts[0])
|
||||
|
||||
|
||||
class ToPlainSubscriptTests(TestCase):
|
||||
def test_bare_subscripts_are_unicode(self):
|
||||
from rag.services.mathtext import to_plain
|
||||
out = to_plain('S_n = n/2 × (a_1 + a_n)')
|
||||
self.assertNotIn('_', out)
|
||||
self.assertIn('Sₙ', out)
|
||||
|
||||
Reference in New Issue
Block a user