@@ -52,6 +52,8 @@ def _build_link(label, title, href, classes):
5252
5353
5454class MentionPattern (Pattern ):
55+ ANCESTOR_EXCLUDES = ('a' ,)
56+
5557 def __init__ (self , config , md ):
5658 MENTION_RE = r'(@({USER})(?:\/({REPO}))?)' .format (** RE_PARTS )
5759 super (MentionPattern , self ).__init__ (MENTION_RE , md )
@@ -71,6 +73,8 @@ def handleMatch(self, m):
7173
7274
7375class IssuePattern (Pattern ):
76+ ANCESTOR_EXCLUDES = ('a' ,)
77+
7478 def __init__ (self , config , md ):
7579 ISSUE_RE = r'((?:({USER})\/({REPO}))?#([0-9]+))' .format (** RE_PARTS )
7680 super (IssuePattern , self ).__init__ (ISSUE_RE , md )
@@ -87,6 +91,8 @@ def handleMatch(self, m):
8791
8892
8993class CommitPattern (Pattern ):
94+ ANCESTOR_EXCLUDES = ('a' ,)
95+
9096 def __init__ (self , config , md ):
9197 COMMIT_RE = r'((?:({USER})(?:\/({REPO}))?@|\b)([a-f0-9]{{40}})\b)' .format (** RE_PARTS )
9298 super (CommitPattern , self ).__init__ (COMMIT_RE , md )
@@ -122,5 +128,5 @@ def extendMarkdown(self, md, md_globals):
122128 md .inlinePatterns ['commit' ] = CommitPattern (self .getConfigs (), md )
123129
124130
125- def makeExtension (* args , ** kwargs ):
131+ def makeExtension (* args , ** kwargs ): # pragma: no cover
126132 return GithubLinks (* args , ** kwargs )
0 commit comments