diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-05-03 00:46:17 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-05-03 00:46:17 +0000 |
| commit | c20e1f296491ce90133eb1dddfe6f504ee9db26c (patch) | |
| tree | 984d573ddbc7fc879cc5af6931403d7bc5052ece /docutils | |
| parent | abecd9557393b8a49965f04edad866b950feb338 (diff) | |
| download | docutils-c20e1f296491ce90133eb1dddfe6f504ee9db26c.tar.gz | |
simplification & added test
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3284 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
| -rw-r--r-- | docutils/writers/html4css1.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docutils/writers/html4css1.py b/docutils/writers/html4css1.py index cfb088fcb..5130bf1d4 100644 --- a/docutils/writers/html4css1.py +++ b/docutils/writers/html4css1.py @@ -118,10 +118,9 @@ class Writer(writers.Writer): self.translator_class = HTMLTranslator def translate(self): - visitor = self.translator_class(self.document) + self.visitor = visitor = self.translator_class(self.document) self.document.walkabout(visitor) self.output = visitor.astext() - self.visitor = visitor for attr in ('head_prefix', 'stylesheet', 'head', 'body_prefix', 'body_pre_docinfo', 'docinfo', 'body', 'fragment', 'body_suffix'): @@ -1347,6 +1346,7 @@ class HTMLTranslator(nodes.NodeVisitor): check_id = 1 close_tag = '</caption>\n' elif self.section_level == 0: + assert node.parent is self.document # document title self.head.append('<title>%s</title>\n' % self.encode(node.astext())) |
