mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-05-20 17:30:46 +02:00
Issue #91: Improve the regex used for matching ticket numbers to links,
thanks to Sumeet A.
This commit is contained in:
parent
76f8d416c0
commit
d211ad5c9e
@ -37,7 +37,7 @@ def num_to_link(text):
|
|||||||
return text
|
return text
|
||||||
|
|
||||||
matches = []
|
matches = []
|
||||||
for match in re.finditer(" #(\d+)", text):
|
for match in re.finditer(r"(?:[^&]|\b|^)#(\d+)\b", text):
|
||||||
matches.append(match)
|
matches.append(match)
|
||||||
|
|
||||||
for match in ReverseProxy(matches):
|
for match in ReverseProxy(matches):
|
||||||
|
Loading…
Reference in New Issue
Block a user