robot icon indicating copy to clipboard operation
robot copied to clipboard

diff should infer intended output format from suffix

Open cmungall opened this issue 2 years ago • 1 comments
trafficstars

It would be more consistent with other behavior if diff took the default diff output format from the file suffix.

The current behavior is a bit confusing, as the default "plain" is almost idiomatic markdown; for example, doing an arbitrary diff on 2 versions of envo with -o diff.md and no --format md gives lines like this:

- SubClassOf(<ENVO:01000197>[broadleaf forest biome] ObjectSomeValuesFrom(<RO:0000056>[participates in] <ENVO:01001827>[climactic ecological succession]))

If the diff consists only of deletions, then this looks like a markdown list, the <ENVO:01000197>[broadleaf forest biome] looks kind of like a broken markdown link.

This could be considered a breaking change which we don't do, in which case I think just an additional note of caution in the docs should be sufficient to close this (I can do this if this is the preferred action)

cmungall avatar Sep 25 '23 15:09 cmungall

I think this would be a good change. The risk of breakage seems small to me.

jamesaoverton avatar Sep 25 '23 15:09 jamesaoverton