[Doc-SIG] Diffing reStructuredText documents that only differ by formatting
Martin Blais
blais at furius.ca
Mon Mar 2 21:21:01 CET 2009
On Mon, 2 Mar 2009 17:33:46 +0000 (UTC), "Jeffrey C. Jacobs" <docutils.org.timehorse at neverbox.com> said:
> I am wondering if there is a way to diff 2 versions of a reStructuredText
> document that differ only by line breaks within paragraphs such that
> those
> differences do not trigger a diff entry. In other words, I wonder if
> there is a
> tool out there where:
>
> this is one
> reStructuredText
> paragraph
>
> Is considered equivalent to:
>
> this is one reStructuredText paragraph
>
> Does anyone have any ideas how this can be accomplished, especially with
> respect
> to VCS differences, e.g. svn?
If the differences are only whitespace, xxdiff has an option to keep those gray in the GUI.
tangerine:~/p/xxdiff/src$ xxdiff --list-resource | grep Hunk
Accel.ToggleIgnorePerHunkWhitespace: ""
IgnorePerHunkWhitespace: False
tangerine:~/p/xxdiff/src$
Otherwise you can write a 40 lines Python script to parse GNU diff output and filter out those changes from the diff hunks.
More information about the Doc-SIG
mailing list