[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [wdiff-bugs] [patch] html support

From: Andrew Clausen
Subject: Re: [wdiff-bugs] [patch] html support
Date: Sun, 6 Jan 2008 22:40:18 -0500
User-agent: Mutt/1.4.2i

Hi Denver,

On Sun, Jan 06, 2008 at 01:58:18PM -0500, Denver Gingerich wrote:
> Thanks for the patch.  I'm not sure what the conventions are for GNU
> command-line tools with respect to outputting HTML.  It seems that it
> might be better to have an HTML post-processor that takes the normal
> output of wdiff and converts it to HTML.  That way wdiff only has to
> worry about one type of formatting (plain text).  This appears to be
> what the GNU diff people expect since GNU diff doesn't natively
> support HTML output.

>From a usability point of view, I think it's desirable to have a single
wdiff front-end command to handle everything.  (It's easier to find
what you want with a single front-end, and the options in all the various
output formats are likely to overlap substantially.)

>From a maintainability point of view, I don't see a big advantage from having
HTML output generated via a wdiff post-processor.  Most of the code would be
parsing wdiff's output rather than generating html.

> I would appreciate comments from anyone on this list that can suggest
> the best way of providing different types of output for wdiff.  I
> suppose ideally there would be a wdiff library that could be linked
> into programs that specify a particular type of output, but that
> doesn't really seem practical at this point.

How about a vtable for copy_word() and copy_whitespace()?

> If I were to accept your patch for HTML output, it would need some
> fixes.  First of all, it should use the XHTML 1.0 convention of
> lower-case element and attribute names (ie. <style type="text/css">
> instead of <STYLE TYPE="text/css">).  Also, it should allow the user
> to specify whether headers and footers are included.  The user may
> wish to include the output in an existing HTML file.  I suggest that
> you run a few examples through the W3C Markup Validation Service
> (http://validator.w3.org/) to ensure that the output is valid HTML or


> Additionally, any patch should include tests that verify it works
> correctly.  These should go in the "tests" directory of wdiff along
> with the other test cases.

Fair enough.

> Finally, your patch must apply cleanly to the latest version of wdiff
> in CVS.  The patch you sent appears to be made from an older version
> of wdiff (perhaps 0.5) and does not apply cleanly to the latest
> version in CVS.

You still use CVS?!  I got wdiff from the latest Ubuntu with "apt-get source".
Are they a long way behind CVS?

> > You can download my patch here:
> >
> >         http://www.econ.upenn.edu/~clausen/computing/wdiff-html.diff
> While links to patches are nice, I would prefer if you attached your
> patch to the e-mail.  This provides the mailing list with a permanent
> record of the patch, which is not offered by a URL that may become
> invalid at some point in the future.

Fair enough.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]