diff --git a/src/index.ts b/src/index.ts index 2852d42..58e2f61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -101,7 +101,7 @@ function convertBundleIntoReact( } const content: React.ReactNode[] = []; - const linkRegex = /(\s+|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g; + const linkRegex = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g; let index = 0; let match: RegExpExecArray | null;