From 77d67a4d29a1c4e408a998d40017ef375d7450b8 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 16 Jun 2011 04:51:02 -0400 Subject: Fixed #23. Turns out markdown.pl only allows up to one space between brackets in reference links. Now we do as well. --- markdown/inlinepatterns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 0267482..35f0335 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -108,9 +108,9 @@ r'''\(\s*(<.*?>|((?:(?:\(.*?\))|[^\(\)]))*?)\s*((['"])(.*?)\12\s*)?\)''' IMAGE_LINK_RE = r'\!' + BRK + r'\s*\((<.*?>|([^\)]*))\)' # ![alttxt](http://x.com/) or ![alttxt]() -REFERENCE_RE = NOIMG + BRK+ r'\s*\[([^\]]*)\]' # [Google][3] +REFERENCE_RE = NOIMG + BRK+ r'\s?\[([^\]]*)\]' # [Google][3] SHORT_REF_RE = NOIMG + r'\[([^\]]+)\]' # [Google] -IMAGE_REFERENCE_RE = r'\!' + BRK + '\s*\[([^\]]*)\]' # ![alt text][2] +IMAGE_REFERENCE_RE = r'\!' + BRK + '\s?\[([^\]]*)\]' # ![alt text][2] NOT_STRONG_RE = r'((^| )(\*|_)( |$))' # stand-alone * or _ AUTOLINK_RE = r'<((?:f|ht)tps?://[^>]*)>' # AUTOMAIL_RE = r'<([^> \!]*@[^> ]*)>' # -- cgit v1.2.3