From b168827ef2815bfb46b6d4bd5b60d312b9004798 Mon Sep 17 00:00:00 2001 From: thomasjm Date: Wed, 11 Nov 2026 04:16:00 -0800 Subject: [PATCH] =?UTF-8?q?Test=20that=20inline=20\(=E2=80=A6\)=20math=20i?= =?UTF-8?q?sn't=20spellchecked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/basic.test.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/basic.test.tsx b/test/basic.test.tsx index 773c388..593bb70 100644 --- a/test/basic.test.tsx +++ b/test/basic.test.tsx @@ -177,6 +177,31 @@ andz more`, [ ]); }); +test('Ignores inline math', async () => { + await spell(`Herez is \\(\\frac{a}{b} + \\sqrt{x}\\) inlinez`, [ + [0, 0, 5], + [0, 36, 43] + ]); +}); + +test('Ignores inline math in a list item and a heading', async () => { + await spell(`* itemz \\(\\frac{1}{2}\\) z + +# Headz \\(\\sqrt{x}\\)`, [ + [0, 2, 7], + [2, 2, 7] + ]); +}); + +test('Positions words after inline math that spans lines', async () => { + await spell(`a \\(\\alpha +\\beta\\) wordz +morez`, [ + [1, 8, 13], + [2, 0, 5] + ]); +}); + test('Checks around dollar signs in prose', async () => { await spell(`It costs $5 and $10, whichz is a lot`, [[0, 21, 27]]); });