diff --git a/pagure/pfmarkdown.py b/pagure/pfmarkdown.py index dc8323f..2e28810 100644 --- a/pagure/pfmarkdown.py +++ b/pagure/pfmarkdown.py @@ -31,12 +31,19 @@ import pagure.lib MENTION_RE = r'@(\w+)' -EXPLICIT_LINK_RE = r'(?[0-9]+)' # Get the identifier `#` +# Each line below correspond to a line of the regex: +# 1) Ensure we catch the motif from the start +# 2) See if there is a `forks/` at the start +# 3) See if we have a `user/` +# 4) See if we have a `namespace/` +# 5) Get the last part `project` +# 6) Get the identifier `#` +EXPLICIT_LINK_RE = r'(?[0-9]+)' IMPLICIT_ISSUE_RE = r'[^|\w](?