From a08ae06b9992c52bd238993253ff949a8155b2df Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 9 Mar 2010 15:58:46 +1300 Subject: [PATCH] Properly find all h1 tags I have been using e.findall(x) when I meant list(e.iter(x)) --- objavi/xhtml_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objavi/xhtml_utils.py b/objavi/xhtml_utils.py index a3e4827..6e2fc29 100644 --- a/objavi/xhtml_utils.py +++ b/objavi/xhtml_utils.py @@ -196,7 +196,7 @@ class BaseChapter(object): el1.tag = 'h1' #2. how many

s are there? - h1s = body.findall('h1') + h1s = list(body.iter('h1')) if not h1s: log("BAD STRUCTURE: no h1! making one up") h1 = body.makeelement('h1') -- 2.11.4.GIT