0

FIX : Chat: words containing one or more dots are turned into links #2898 (#2903)

* FIX: Chat: words containing one or more dots are turned into links #2898

Making validateTLD to true and also adding a parameter of customTLDs

* Update ChatUserMessage.tsx

* Prettified Code!

---------

Co-authored-by: dev265545 <dev265545@users.noreply.github.com>
This commit is contained in:
Dev Gupta 2023-04-04 06:30:21 +05:30 committed by GitHub
parent 3902ff48dd
commit 11a3a79032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export const ChatSystemMessage: FC<ChatSystemMessageProps> = ({
className={styles.message}
content={body}
matchers={[
new UrlMatcher('url', { validateTLD: false }),
new UrlMatcher('url',{ customTLDs: ['online'] }),
new ChatMessageHighlightMatcher('highlight', { highlightString }),
]}
/>

View File

@ -110,7 +110,7 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
className={styles.message}
content={body}
matchers={[
new UrlMatcher('url', { validateTLD: false }),
new UrlMatcher('url', { customTLDs: ['online'] }),
new ChatMessageHighlightMatcher('highlight', { highlightString }),
]}
/>