Revert "fix weirdness in RawHtml mention regex"

This reverts commit f4710dc7f8.

> This was intended to prevent backtracking.
{2,30}+ is posessive, i.e., it will not give back any characters it has consumed.
pull/9799/head
Thibault Duplessis 2021-09-14 18:17:55 +02:00
parent 3f81db0cbc
commit 4a2a1a9547
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ final object RawHtml {
// word (i.e. preceded and followed by space or appropriate punctuation):
// Yes: everyone says @ornicar is a pretty cool guy
// No: contact@lichess.org, @1, http://example.com/@happy0, @lichess.org
val atUsernameRegex = """@(?<![\w@#/]@)([\w-]{2,30})(?![@\w-]|\.\w)""".r
val atUsernameRegex = """@(?<![\w@#/]@)([\w-]{2,30}+)(?![@\w-]|\.\w)""".r
private[this] val atUsernamePat = atUsernameRegex.pattern