def htmldiff(old_html, new_html):
 old_html_tokens = tokenize(old_html)
 new_html_tokens = tokenize(new_html)
 result = htmldiff_tokens(old_html_tokens, new_html_tokens)
 result = ''.join(result).strip()
 return fixup_ins_del_tags(result)

def htmldiff ( old_html , new_html ) : old_html_tokens = tokenize ( old_html ) new_html_tokens = tokenize ( new_html ) result = htmldiff_tokens ( old_html_tokens , new_html_tokens ) result = '' . join ( result ) . strip ( ) return fixup_ins_del_tags ( result )
do a diff of the old and new document .