Skip to content
jdfrens edited this page Sep 12, 2010 · 4 revisions

This could be useful:

diff --old-line-format='<tr><td>%l</td>' \
  --new-line-format='<td>%l<td></tr>' \
  --unchanged-line-format='<tr><td>%l</td><td>%l</td></tr>'

I’m not sure how to style the changed lines different from the additions and deletions with the example above. This should work better:

diff --old-group-format='<tr><td>%<</td><td></td></tr>' \
  --new-group-format='<tr><td></td><td>%><td></tr>' \
  --changed-group-format='<tr><td>%<</td><td>%></td></tr>' \
  --unchanged-group-format='<tr><td> %= </td><td> %= </td></tr>'