From 3c69b0fb1d86f68a337bf3bd9b4a86b30a5fe6bf Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sun, 21 Jun 2015 21:21:49 -0400 Subject: Fixed many failing tests in inline refactor. Still a ways to go. --- markdown/extensions/footnotes.py | 2 +- markdown/extensions/legacy_em.py | 4 ++-- markdown/extensions/wikilinks.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'markdown/extensions') diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py index c04ad68..a237ae7 100644 --- a/markdown/extensions/footnotes.py +++ b/markdown/extensions/footnotes.py @@ -264,7 +264,7 @@ class FootnotePattern(Pattern): self.footnotes = footnotes def handleMatch(self, m): - id = m.group(2) + id = m.group(1) if id in self.footnotes.footnotes.keys(): sup = etree.Element("sup") a = etree.SubElement(sup, "a") diff --git a/markdown/extensions/legacy_em.py b/markdown/extensions/legacy_em.py index 47963a8..54d2028 100644 --- a/markdown/extensions/legacy_em.py +++ b/markdown/extensions/legacy_em.py @@ -15,8 +15,8 @@ from __future__ import unicode_literals from . import Extension from ..inlinepatterns import SimpleTagPattern -EMPHASIS_RE = r'(\*|_)(.+?)\2' -STRONG_RE = r'(\*{2}|_{2})(.+?)\2' +EMPHASIS_RE = r'(\*|_)(.+?)\1' +STRONG_RE = r'(\*{2}|_{2})(.+?)\1' class LegacyEmExtension(Extension): diff --git a/markdown/extensions/wikilinks.py b/markdown/extensions/wikilinks.py index 14f47a1..7b8899b 100644 --- a/markdown/extensions/wikilinks.py +++ b/markdown/extensions/wikilinks.py @@ -57,9 +57,9 @@ class WikiLinks(Pattern): self.config = config def handleMatch(self, m): - if m.group(2).strip(): + if m.group(1).strip(): base_url, end_url, html_class = self._getMeta() - label = m.group(2).strip() + label = m.group(1).strip() url = self.config['build_url'](label, base_url, end_url) a = etree.Element('a') a.text = label -- cgit v1.2.1