Explorar el Código

Fix MENTION_RE to not match nil usernames (#6862)

master
ThibG hace 6 años
committed by Eugen Rochko
padre
commit
6f531d140b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      app/models/account.rb

+ 1
- 1
app/models/account.rb Ver fichero

@@ -48,7 +48,7 @@

class Account < ApplicationRecord
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.]+[a-z0-9_]+)?/i
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE}?)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i

include AccountAvatar
include AccountFinderConcern


Cargando…
Cancelar
Guardar