Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const DiffView = ({ oldText, newText, viewType, patch }) => {
const markEdits = markCharacterEdits({
threshold: 30,
markLongDistanceDiff: true,
});
// old,new Text
if (patch === '') {
const gitDiff = getDiff(oldText, newText);
const files = parseDiff(gitDiff);
const hunk = files[0].hunks;
return (
hunk &&
);
}
// Patch
const files = parseDiff(