def diff(old_html, new_html, cutoff=<NUM_LIT:0.0>, plaintext=False, pretty=False):
if plaintext:<EOL><INDENT>old_dom = parse_text(old_html)<EOL>new_dom = parse_text(new_html)<EOL><DEDENT>else:<EOL><INDENT>old_dom = parse_minidom(old_html)<EOL>new_dom = parse_minidom(new_html)<EOL><DEDENT>if not check_text_similarity(old_dom, new_dom, cutoff):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>dom = dom_diff(old_dom, new_dom)<EOL>if not plaintext:<EOL><INDENT>fix_lists(dom)<EOL>fix_tables(dom)<EOL><DEDENT>body_elements = dom.getElementsByTagName('<STR_LIT:body>')<EOL>if len(body_elements) == <NUM_LIT:1>:<EOL><INDENT>dom = body_elements[<NUM_LIT:0>]<EOL><DEDENT>return minidom_tostring(dom, pretty=pretty)<EOL>
Show the differences between the old and new html document, as html.

    Return the document html with extra tags added to show changes. Add <ins>
    tags around newly added sections, and <del> tags to show sections that have
    been deleted.