diff options
Diffstat (limited to 'logilab/common/ureports/html_writer.py')
-rw-r--r-- | logilab/common/ureports/html_writer.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/logilab/common/ureports/html_writer.py b/logilab/common/ureports/html_writer.py index 02d0816..989662f 100644 --- a/logilab/common/ureports/html_writer.py +++ b/logilab/common/ureports/html_writer.py @@ -3,22 +3,21 @@ # # This file is part of logilab-common. # -# logilab-common is free software: you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation, either version 2.1 of the License, or (at your option) any -# later version. +# logilab-common is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by the +# Free Software Foundation, either version 2.1 of the License, +# or (at your option) any later version. # # logilab-common is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # -# You should have received a copy of the GNU Lesser General Public License along -# with logilab-common. If not, see <http://www.gnu.org/licenses/>. +# You should have received a copy of the GNU Lesser General Public License +# along with logilab-common. If not, see <http://www.gnu.org/licenses/>. """HTML formatting drivers for ureports""" __docformat__ = "restructuredtext en" -from cgi import escape from logilab.common.ureports import BaseWriter @@ -54,7 +53,6 @@ class HTMLWriter(BaseWriter): self.writeln(u'</body>') self.writeln(u'</html>') - def visit_section(self, layout): """display a section as html, using div + h[section level]""" self.section += 1 @@ -80,7 +78,7 @@ class HTMLWriter(BaseWriter): elif i+1 == len(table_content) and layout.rrheaders: self.writeln(u'<tr class="header">') else: - self.writeln(u'<tr class="%s">' % (i%2 and 'even' or 'odd')) + self.writeln(u'<tr class="%s">' % (i % 2 and 'even' or 'odd')) for j in range(len(row)): cell = row[j] or u' ' if (layout.rheaders and i == 0) or \ @@ -117,6 +115,7 @@ class HTMLWriter(BaseWriter): self.write(u' <a href="%s"%s>%s</a>' % (layout.url, self.handle_attrs(layout), layout.label)) + def visit_verbatimtext(self, layout): """display verbatim text (using <pre>)""" self.write(u'<pre>') |