From bba9388ea95dd17c3aeb92c3415063bc7fb25918 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 2 Nov 2023 17:29:27 -0500 Subject: [PATCH] Add a test for links that end in .php (#1810) --- packages/api/tests/rich-text-detection.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/api/tests/rich-text-detection.test.ts b/packages/api/tests/rich-text-detection.test.ts index 64a53d1131c..88f2940c59e 100644 --- a/packages/api/tests/rich-text-detection.test.ts +++ b/packages/api/tests/rich-text-detection.test.ts @@ -40,6 +40,7 @@ describe('detectFacets', () => { 'start.com/foo/bar?baz=bux#hash middle end', 'start middle end.com/foo/bar?baz=bux#hash', 'newline1.com\nnewline2.com', + 'a example.com/index.php php link', 'not.. a..url ..here', 'e.g.', @@ -156,6 +157,11 @@ describe('detectFacets', () => { ['\n'], ['newline2.com', 'https://newline2.com'], ], + [ + ['a '], + ['example.com/index.php', 'https://example.com/index.php'], + [' php link'], + ], [['not.. a..url ..here']], [['e.g.']],