diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-07-28 13:19:30 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-07-28 13:19:30 -0400 |
commit | df8423b93eb11fede3a8eeae416e5985ffab64da (patch) | |
tree | a01670a176d1b249c8234541a29da1149c150b60 | |
parent | ba3d5bd29263f10bdd36453e61d1654d30bdfe08 (diff) | |
download | markdown-df8423b93eb11fede3a8eeae416e5985ffab64da.tar.gz markdown-df8423b93eb11fede3a8eeae416e5985ffab64da.tar.bz2 markdown-df8423b93eb11fede3a8eeae416e5985ffab64da.zip |
Fix Python 3 compat in Attr_list. Fixes #218.
-rw-r--r-- | markdown/extensions/attr_list.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 2175691..fabc925 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -97,7 +97,7 @@ class AttrListTreeprocessor(Treeprocessor): if m: self.assign_attrs(elem, m.group(1)) elem[-1].tail = elem[-1].tail[:m.start()] - elif pos > 0 and elem[pos-1].tail: + elif pos is not None and pos > 0 and elem[pos-1].tail: # use tail of last child before ul or ol m = RE.search(elem[pos-1].tail) if m: |