import { matcher } from "../matcher"; export const PLAIN_LINK_REG = /((?:https?|chrome|edge):\/\/[^ ]+)/; const renderer = (rawStr: string) => { const matchResult = matcher(rawStr, PLAIN_LINK_REG); if (!matchResult) { return rawStr; } return ( {matchResult[1]} ); }; export default { name: "plain link", regexp: PLAIN_LINK_REG, renderer, };