diff options
author | Yuri Takhteyev <yuri@freewisdom.org> | 2008-12-04 10:25:33 -0800 |
---|---|---|
committer | Yuri Takhteyev <yuri@freewisdom.org> | 2008-12-04 10:25:33 -0800 |
commit | 50783a6600c21801edee16b2f523292e82cbcf9f (patch) | |
tree | 4f1b9b810b2c2860a3b9fbf4f9fa878cfc573507 /markdown/extensions | |
parent | d952587e33fcebb8f3807a863f2bdd50b86b5b23 (diff) | |
download | markdown-50783a6600c21801edee16b2f523292e82cbcf9f.tar.gz markdown-50783a6600c21801edee16b2f523292e82cbcf9f.tar.bz2 markdown-50783a6600c21801edee16b2f523292e82cbcf9f.zip |
Getting rid of has_key for compatibility with python3k.
Diffstat (limited to 'markdown/extensions')
-rw-r--r-- | markdown/extensions/toc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py index 60fe430..3e6e075 100644 --- a/markdown/extensions/toc.py +++ b/markdown/extensions/toc.py @@ -37,7 +37,7 @@ class TocTreeprocessor(markdown.treeprocessors.Treeprocessor): # Get a list of id attributes used_ids = [] for c in doc.getiterator(): - if c.attrib.has_key("id"): + if "id" in c.attrib: used_ids.append(c.attrib["id"]) for (p, c) in self.iterparent(doc): @@ -75,7 +75,7 @@ class TocTreeprocessor(markdown.treeprocessors.Treeprocessor): level = tag_level # Do not override pre-existing ids - if not c.attrib.has_key("id"): + if not "id" in c.attrib: id = self.config["slugify"][0](c.text) if id in used_ids: ctr = 1 |