From 6115ecc9185be643c6825fd4bd969edc4eff81ec Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 6 May 2009 20:28:56 -0400 Subject: Fixed ticket 33. Tweaked the regex for inline links so that the title is non-greedy - it no longer eats everything between the first links title and the last links title in a paragraph. Thanks to Charles Winebrinner for the report. --- markdown/inlinepatterns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 5e14067..331bead 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -74,7 +74,7 @@ else: EMPHASIS_2_RE = r'(_)(.+?)\2' # _emphasis_ LINK_RE = NOIMG + BRK + \ -r'''\(\s*(<.*?>|((?:(?:\(.*?\))|[^\(\)]))*?)\s*((['"])(.*)\12)?\)''' +r'''\(\s*(<.*?>|((?:(?:\(.*?\))|[^\(\)]))*?)\s*((['"])(.*?)\12)?\)''' # [text](url) or [text]() IMAGE_LINK_RE = r'\!' + BRK + r'\s*\((<.*?>|([^\)]*))\)' -- cgit v1.2.3