everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
14 lines (13 loc) • 380 B
JavaScript
//#region src/utils/linkify.ts
const URL_REGEX = /https?:\/\/[^\s<>"{}|\\^`[\]]+/g;
const OSC_START = "\x1B]8;;";
const OSC_END = "\x07";
const OSC_RESET = "\x1B]8;;\x07";
const linkify = (text) => {
return text.replace(URL_REGEX, (url) => {
return `${OSC_START}${url}${OSC_END}${url}${OSC_RESET}`;
});
};
//#endregion
export { linkify };
//# sourceMappingURL=linkify.mjs.map