From 90bb3be5176a4daa843bc4b8f224c74383a2687c Mon Sep 17 00:00:00 2001
From: Clement Verna
Date: Aug 20 2017 15:36:50 +0000
Subject: Remove the front whitespace from the commit markdown regex
This commit remove the not needed whitespace lookup from the custom
regex to render the commit hash using the markdown processor.
Fixes #2082
Signed-off-by: Clement Verna
---
diff --git a/pagure/pfmarkdown.py b/pagure/pfmarkdown.py
index 2ed0799..fcb74e0 100644
--- a/pagure/pfmarkdown.py
+++ b/pagure/pfmarkdown.py
@@ -53,7 +53,7 @@ COMMIT_LINK_RE = \
'#(?P[\w]{40})'
IMPLICIT_ISSUE_RE = r'[^|\w](?\w#])([a-f0-9]{7,40})'
+IMPLICIT_COMMIT_RE = r'(?Cf commit 936435
',
# 'Cf commit 9364354',
#'Cf commit 9364354
',
- 'Cf commit 9364354
',
+ 'Cf commit 9364354
',
# 'Cf commit 9364354a',
- 'Cf commit 9364354
',
+ 'Cf commit 9364354
',
# 'Cf commit 9364354a4555ba17aa60f0dc844d70b74eb1aecd',
- 'Cf commitCf commit 9364354
',
+ '>9364354',
]
with pagure.APP.app_context():
@@ -752,7 +752,7 @@ class PagureFlaskApptests(tests.Modeltests):
first_commit = repo.revparse_single('HEAD')
text = 'Cf commit %s' % first_commit.oid.hex
- exp = 'Cf commit {1}'\
+ exp = 'Cf commit {1}'\
'
'.format(first_commit.oid.hex, first_commit.oid.hex[:7])
with pagure.APP.app_context():