[Python-Dev] HTML side by side diff patch 914575

Walter Dörwald walter at livinglogic.de
Fri Jun 18 11:55:41 EDT 2004


Dan Gass wrote:

> Raymond,
> 
> I'm attaching two samples of the latest side by side differencing HTML
> output from/of the difflib.py patch.  If you get the chance, look at
> the samples at let me know what you think of how they look/function.

The file is a strange mix of HTML and XHTML. It contains <br> and
<td nowrap> (i.e. HTML) and <a name="_chg_to_0"/> without any end tag
(i.e. real XML). I'd prefer a patch that generates valid XML, which
is backwards compatible (i.e. <br /> and <a name="_chg_to_0"></a>).
All attributes should be quoted.

The file uses a mix of name and id attributes (but not everywhere).

All style information should be moved to an external file. The URL
of this external file should be a parameter for the generation process.

Padding line numbers with 0s is confusing IMHO.

The additional <span class=sub>...</span> is unneccessary as the
class could be put into the <td>.

What about encoding issues? The HTML file doesn't contain any encoding
declaration, so it will default to latin-1 regardless of the encoding
of the original files. Unfortunately this is rather difficult to fix.

Bye,
    Walter Dörwald



More information about the Python-Dev mailing list