diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-06-16 04:51:02 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-06-16 04:51:02 -0400 |
commit | 77d67a4d29a1c4e408a998d40017ef375d7450b8 (patch) | |
tree | 18fc61fa0aa20b5e96cbe0522fff4c27521f1093 | |
parent | f6ab9657aa75d5fa503375ac88ac5f15f8c53b82 (diff) | |
download | markdown-77d67a4d29a1c4e408a998d40017ef375d7450b8.tar.gz markdown-77d67a4d29a1c4e408a998d40017ef375d7450b8.tar.bz2 markdown-77d67a4d29a1c4e408a998d40017ef375d7450b8.zip |
Fixed #23. Turns out markdown.pl only allows up to one space between brackets in reference links. Now we do as well.
-rw-r--r-- | markdown/inlinepatterns.py | 4 |
1 files 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](<http://x.com/>) -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?://[^>]*)>' # <http://www.123.com> AUTOMAIL_RE = r'<([^> \!]*@[^> ]*)>' # <me@example.com> |