]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/config.ts
Use shorter regex in community link parser
[lemmy-ui.git] / src / shared / config.ts
index 6b462244f2e4519575106e2cde46c0b13eec8176..db7e688ae359f7a62506a8a9213d5d6aadf5c69b 100644 (file)
@@ -33,6 +33,6 @@ export const emDash = "\u2014";
  * /u/username@server.com
  */
 export const instanceLinkRegex =
-  /(\/[c|m|u]\/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|![a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/g;
+  /(\/[c|m|u]\/|!)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
 
 export const testHost = "0.0.0.0:8536";