diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2016-09-23 19:36:40 -0400 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2016-09-23 19:36:40 -0400 |
commit | 8384d26981572cf500021e826a67164d69c5d75f (patch) | |
tree | 230cc03dad688fe11d3713e95d0bf5da2f89ca72 /markdown | |
parent | 4747cf794b03920153a10ee7a8dd53011bf4802f (diff) | |
parent | 5f358c0d580bd409279cef1404e6460e7fe2156e (diff) | |
download | markdown-8384d26981572cf500021e826a67164d69c5d75f.tar.gz markdown-8384d26981572cf500021e826a67164d69c5d75f.tar.bz2 markdown-8384d26981572cf500021e826a67164d69c5d75f.zip |
Merge branch 'master' of https://github.com/waylan/Python-Markdown
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/extensions/attr_list.py | 6 | ||||
-rw-r--r-- | markdown/extensions/tables.py | 1 | ||||
-rw-r--r-- | markdown/inlinepatterns.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 8735538..c897a9c 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -32,17 +32,17 @@ except AttributeError: # pragma: no cover def _handle_double_quote(s, t): - k, v = t.split('=') + k, v = t.split('=', 1) return k, v.strip('"') def _handle_single_quote(s, t): - k, v = t.split('=') + k, v = t.split('=', 1) return k, v.strip("'") def _handle_key_value(s, t): - return t.split('=') + return t.split('=', 1) def _handle_word(s, t): diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py index a19018e..8c11739 100644 --- a/markdown/extensions/tables.py +++ b/markdown/extensions/tables.py @@ -45,6 +45,7 @@ class TableProcessor(BlockProcessor): # Get alignment of columns align = [] for c in self._split_row(seperator, border): + c = c.strip() if c.startswith(':') and c.endswith(':'): align.append('center') elif c.startswith(':'): 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?\[([^\]]*)\]' |