diff options
author | facelessuser <faceless.shop@gmail.com> | 2016-07-26 20:28:18 -0600 |
---|---|---|
committer | facelessuser <faceless.shop@gmail.com> | 2016-07-26 20:28:18 -0600 |
commit | 65170bf24268620598ef0d5a19aa945af5cb22f4 (patch) | |
tree | 86b43b641da6bf341a7e7116fb17450b5e6a44cc /markdown | |
parent | 0e48b550d8d533c8cf24e5349bb9c7f6a19db1d2 (diff) | |
download | markdown-65170bf24268620598ef0d5a19aa945af5cb22f4.tar.gz markdown-65170bf24268620598ef0d5a19aa945af5cb22f4.tar.bz2 markdown-65170bf24268620598ef0d5a19aa945af5cb22f4.zip |
Fix image titles not following spec
Don’t allow spaces in image links. This was also causing an issue
where any text following a space was treated as a title. Ref #484.
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/inlinepatterns.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index dcf4ad4..6d4c969 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -130,7 +130,7 @@ LINK_RE = NOIMG + BRK + \ r'''\(\s*(<.*?>|((?:(?:\(.*?\))|[^\(\)]))*?)\s*((['"])(.*?)\12\s*)?\)''' # ![alttxt](http://x.com/) or ![alttxt](<http://x.com/>) -IMAGE_LINK_RE = r'\!' + BRK + r'\s*\((<.*?>|([^")]+"[^"]*"|[^\)]*))\)' +IMAGE_LINK_RE = r'\!' + BRK + r'\s*\(\s*(<.*?>|([^"\)\s]+\s*"[^"]*"|[^\)\s]*))\s*\)' # [Google][3] REFERENCE_RE = NOIMG + BRK + r'\s?\[([^\]]*)\]' |