From 4a42425b07b16d47fac8d56231df19067ad231e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noe=CC=81=20Malzieu?= Date: Mon, 28 Oct 2024 11:43:44 +0100 Subject: [PATCH] Add comma to boundary for domains --- utils/conversation.ts | 2 +- utils/regex.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/conversation.ts b/utils/conversation.ts index 326e6245e..af50c340c 100644 --- a/utils/conversation.ts +++ b/utils/conversation.ts @@ -271,7 +271,7 @@ export const openMainConversationWithPeer = async ( isDone = true; Alert.alert( translate("identity_not_yet_xmtp_title"), - translate("identity_not_yet_xmtp", {}), + translate("identity_not_yet_xmtp", { identity: peerToCreateConvoWith }), [ { text: "OK", diff --git a/utils/regex.ts b/utils/regex.ts index 49d4d1458..ff27ff647 100644 --- a/utils/regex.ts +++ b/utils/regex.ts @@ -1,6 +1,6 @@ -const BOUNDARY_START_LOOKBEHIND = /(\s|\(|"|')/.source; // Either a space or a (, or a " or a ' +const BOUNDARY_START_LOOKBEHIND = /(\s|\(|"|'|,)/.source; // Either a space or a (, or a " or a ' const BOUNDARY_START = new RegExp(`(?<=${BOUNDARY_START_LOOKBEHIND})|^`).source; // It must be start of the line or be preceded by lookbehind -const BOUNDARY_END_LOOKAHEAD = /(\s|\)|$|\.|!|\?|\r\n|\r|\n|"|')/.source; // Either a space, the end of the text, or a ), a ., a !, a ?, a line break, or a " or a ' +const BOUNDARY_END_LOOKAHEAD = /(\s|\)|$|\.|!|\?|\r\n|\r|\n|"|'|,)/.source; // Either a space, the end of the text, or a ), a ., a !, a ?, a line break, or a " or a ' const BOUNDARY_END = new RegExp(`(?=${BOUNDARY_END_LOOKAHEAD})`).source; const WORD_CONTENT = /[^()/\s]/.source; // Not a space, not a ( or ), not a /