chat: account for multiple dashes in group name links

This commit is contained in:
Tyler Brown Cifu Shuster 2020-08-15 19:23:06 -07:00
parent 693ab48529
commit 1466ca2f48

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-z0-9])+([/-])?)+/
/([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z0-9-])+([/-])?)+/
);
if ((group !== null) // matched possible chatroom
&& (group[2].length > 2) // possible ship?