From c756859051d37a73e860f20bf2de2afb11d7afaf Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sun, 20 Nov 2022 14:14:00 +0100 Subject: [PATCH] Fix to allow singular `remain` Closes get-alex/alex#336. --- en.js | 1 + test.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/en.js b/en.js index b72c73e..141ba84 100644 --- a/en.js +++ b/en.js @@ -15,6 +15,7 @@ const retextProfanitiesEn = factory({ 'children', 'dy', // Singular of `dies`. 'pro', // Singular of `pros`. + 'remain', // Singular of `remains` 'so', // Singular of `sos`. 'dice', // Plural of `die`. 'fus' // Plural of `fu`. diff --git a/test.js b/test.js index 8230210..6ce8d94 100644 --- a/test.js +++ b/test.js @@ -121,4 +121,14 @@ test('profanities', async () => { ['3:1-3:6: Don’t use `whore`, it’s profane'], 'should not warn about `who are` contractions' ) + + const remain = await retext() + .use(retextProfanities) + .process('Only two minutes still remain in the game.') + + assert.deepEqual( + remain.messages.map(String), + [], + 'should not warn about `remain`' + ) })