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
parent
3f81db0cbc
commit
4a2a1a9547
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue