def visit_checker_messages(self, m, prev_m=None):
    self._dump('<table border="0">')

    def dump_line(l, is_added=None):
        self._dump(('<tr><td>%s</td><td align="left">%s</td></tr>' % (self._diff_plus_minus(is_added), l)))

    def dump_chk(chk, is_added=None):
        dump_line(('<i>%s</i>:' % chk), is_added)
    if (prev_m is not None):
        (removed, added, updated) = m.diff_messages(prev_m)
        for chk in removed:
            dump_chk(chk, False)
            for l in prev_m.items[chk].lines:
                dump_line(l, False)
        for chk in updated:
            dump_chk(chk)
            for l in m.items[chk].diff_lines(prev_m.items[chk]):
                dump_line(l[1:], l.startswith('+'))
        for chk in added:
            dump_chk(chk, True)
            for l in m.items[chk].lines:
                dump_line(l, True)
    else:
        for chk in m.items:
            dump_chk(chk)
            for l in m.items[chk].lines:
                dump_line(l)
    self._dump('</table>')
def visit_checker_messages(self, m, prev_m=None):
    self._dump('<table border="0">')

    def dump_line(l, is_added=None):
        self._dump(('<tr><td>%s</td><td align="left">%s</td></tr>' % (self._diff_plus_minus(is_added), l)))

    def dump_chk(chk, is_added=None):
        dump_line(('<i>%s</i>:' % chk), is_added)
    if (prev_m is not None):
        (removed, added, updated) = m.diff_messages(prev_m)
        for chk in removed:
            dump_chk(chk, False)
            for l in prev_m.items[chk].lines:
                dump_line(l, False)
        for chk in updated:
            dump_chk(chk)
            for l in m.items[chk].diff_lines(prev_m.items[chk]):
                dump_line(l[1:], l.startswith('+'))
        for chk in added:
            dump_chk(chk, True)
            for l in m.items[chk].lines:
                dump_line(l, True)
    else:
        for chk in m.items:
            dump_chk(chk)
            for l in m.items[chk].lines:
                dump_line(l)
    self._dump('</table>')