Merge pull request #3321 from tylershuster/group-name-match

chat: account for digits in group name links
This commit is contained in:
matildepark 2020-08-17 18:36:17 -04:00 committed by GitHub
commit 7acb2da366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export default class TextContent extends Component {
const content = props.content;
const group = content.text.match(
/([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z])+([/-])?)+/
/([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z0-9-])+([/-])?)+/
);
if ((group !== null) // matched possible chatroom
&& (group[2].length > 2) // possible ship?