Add jsonDiff to difference component
This commit is contained in:
@@ -72,7 +72,12 @@ module.exports = createCoreService('api::parole.parole', ({strapi}) => ({
|
||||
const parsePatch = Diff.parsePatch(patch)
|
||||
|
||||
if (parsePatch[0].hunks.length > 0) {
|
||||
return patch
|
||||
const jsonDiff = Diff.diffWords(oldString, newString)
|
||||
|
||||
return {
|
||||
patch,
|
||||
jsonDiff
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user