Merge pull request #6 from ZeusWPI/Jan-PieterBaert-patch-1

edit regex so names containing `-` are allowed
This commit is contained in:
redfast00 2019-06-05 13:32:27 +02:00 committed by GitHub
commit 8fa23b86f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ class Quote(db.Model):
default=datetime.utcnow default=datetime.utcnow
) )
QUOTEE_REGEX = re.compile('\W*(\w+).*') QUOTEE_REGEX = re.compile('\W*([a-zA-Z\-_0-9]+).*')
def __repr__(self): def __repr__(self):
return "<Quote {} \"{}\">".format(self.quoter, self.quote) return "<Quote {} \"{}\">".format(self.quoter, self.quote)