formatting

This commit is contained in:
7w1 committed 2026-05-12 21:10:11 -05:00
1 parent 7785d91f97
commit f92e68a658
1 file changed
+5 -8
+5 -8
View File
@@ -66,14 +66,11 @@ const shieldBareMatrixToLinks = (
const placeholders = new Map<string, string>();
let index = 0;
const shielded = input.replace(
/(?<!\]\()https?:\/\/matrix\.to\/[^\s<)]+/gi,
(url) => {
const key = `${MATRIX_TO_PLACEHOLDER_PREFIX}${index++}X`;
placeholders.set(key, url);
return key;
}
);
const shielded = input.replace(/(?<!\]\()https?:\/\/matrix\.to\/[^\s<)]+/gi, (url) => {
const key = `${MATRIX_TO_PLACEHOLDER_PREFIX}${index++}X`;
placeholders.set(key, url);
return key;
});
return { shielded, placeholders };
};