better-diff
better-diff copied to clipboard
HTML vs non-HTML output
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.
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.
This seems like an argument for creating an object structure in the "Generate the diff from the CSTs" section of #2.
yes, it is.
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.