UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

2 lines (1 loc) 573 B
import{jsx as t}from"react/jsx-runtime";import{createLinkMatcherWithRegExp as a,AutoLinkPlugin as r}from"@lexical/react/LexicalAutoLinkPlugin";import"react";const e=[a(RegExp("((https?:\\/\\/(www\\.)?)|(www\\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)(?<![-.+():%])"),(t=>t.startsWith("http")?t:`https://${t}`)),a(/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,(t=>`mailto:${t}`))],i=()=>t(r,{matchers:e});export{i as default};