better-diff icon indicating copy to clipboard operation
better-diff copied to clipboard

HTML vs non-HTML output

Open leobalter opened this issue 10 years ago • 4 comments

It would be nice to output not only a HTML diff but also some object with the diff results. This way we could use the better-diff both for HTML and anything else.

This would be a golden feature for QUnit.

leobalter avatar Oct 21 '15 19:10 leobalter

Trying to elaborate: let's say I have some common diff object generated by better-diff, so I might call better-diff again only to give me a HTML output, or a stdout/console output.

This common diff object would be the key, even for alternative/customized HTML outputs.

leobalter avatar Oct 21 '15 19:10 leobalter

This seems like an argument for creating an object structure in the "Generate the diff from the CSTs" section of #2.

scottgonzalez avatar Oct 21 '15 19:10 scottgonzalez

yes, it is.

leobalter avatar Oct 21 '15 19:10 leobalter

Agreed. My intention is to split the problem in two... on one side, generating diff information in a format like JSON Patch, and on the other, rendering the diff.

gibson042 avatar Oct 21 '15 19:10 gibson042