wdiff-bugs
[Top][All Lists]
Advanced

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

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


From: Denver Gingerich
Subject: Re: [wdiff-bugs] [patch] html support
Date: Sun, 6 Jan 2008 13:58:18 -0500

On Jan 6, 2008 12:58 AM, Andrew Clausen <address@hidden> wrote:
> Hi all,
>
> I added html support to wdiff.  I added an --html option which formats the
> output in html.

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.

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.

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
XHTML.

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.

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 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.

I have attached the patch to this e-mail so we have a record of it.

Denver

Attachment: wdiff-html.diff
Description: Text Data


reply via email to

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