kopia lustrzana https://gitlab.com/jaywink/federation
Revert the change in patterns matching beginning or space at the beginning because it prevented the use of markdown on hastags and mentions.
rodzic
d577e39777
commit
7d750d3365
|
@ -9,8 +9,8 @@ from bs4.element import NavigableString
|
|||
from commonmark import commonmark
|
||||
|
||||
ILLEGAL_TAG_CHARS = "!#$%^&*+.,@£/()=?`'\\{[]}~;:\"’”—\xa0"
|
||||
TAG_PATTERN = re.compile(r'(^|\s)(#[\w]+)', re.UNICODE)
|
||||
MENTION_PATTERN = re.compile(r'(^|\s)(@{?[\S ]?[^{}@]+[@;]?\s*[\w\-./@]+[\w/]+}?)', re.UNICODE)
|
||||
TAG_PATTERN = re.compile(r'(#[\w]+)', re.UNICODE)
|
||||
MENTION_PATTERN = re.compile(r'(@{?[\S ]?[^{}@]+[@;]?\s*[\w\-./@]+[\w/]+}?)', re.UNICODE)
|
||||
|
||||
|
||||
def decode_if_bytes(text):
|
||||
|
|
Ładowanie…
Reference in New Issue