incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [25/50] git commit: [#6622] ticket:469 improved regex
Date Fri, 15 Nov 2013 15:42:50 GMT
[#6622] ticket:469 improved regex


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/bf301e00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/bf301e00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/bf301e00

Branch: refs/heads/cj/6777
Commit: bf301e006358e0a4d65d720caee8b8f20b097d5f
Parents: 43f1692
Author: coldmind <sokandpal@yandex.ru>
Authored: Wed Nov 6 20:19:06 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Nov 13 17:16:57 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/utils.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/bf301e00/ForgeImporters/forgeimporters/github/utils.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/utils.py b/ForgeImporters/forgeimporters/github/utils.py
index 292b41e..17e28ac 100644
--- a/ForgeImporters/forgeimporters/github/utils.py
+++ b/ForgeImporters/forgeimporters/github/utils.py
@@ -68,22 +68,22 @@ class GitHubMarkdownConverter(object):
         output. ``text`` is *not* code.
 
         """
-        _re = re.compile(r'(\s|^)(\S+)/(\S+)#(\d+)(\s|$)')
+        _re = re.compile(r'(\b)(\S+)/(\S+)#(\d+)(\b)')
         text = _re.sub(self._convert_user_repo_ticket, text)
 
-        _re = re.compile(r'(\s|^)(\S+)#(\d+)(\s|$)')
+        _re = re.compile(r'(\b)(\S+)#(\d+)(\b)')
         text = _re.sub(self._convert_user_ticket, text)
 
         _re = re.compile(r'(\S+\s+)(#\d+)')
         text = _re.sub(self._convert_ticket, text)
 
-        _re = re.compile(r'(\s|^)(\S+)/(\S+)@([0-9a-f]{40})(\s|$)')
+        _re = re.compile(r'(\b)(\S+)/(\S+)@([0-9a-f]{40})(\b)')
         text = _re.sub(self._convert_user_repo_sha, text)
 
-        _re = re.compile(r'(\s|^)(\S+)@([0-9a-f]{40})(\s|$)')
+        _re = re.compile(r'(\b)(\S+)@([0-9a-f]{40})(\b)')
         text = _re.sub(self._convert_user_sha, text)
 
-        _re = re.compile(r'(\s|^)([0-9a-f]{40})(\s|$)')
+        _re = re.compile(r'(\b)([0-9a-f]{40})(\b)')
         text = _re.sub(self._convert_sha, text)
 
         _re = re.compile(r'~~(.*)~~',)


Mime
View raw message