Redline Comparison

Overview

This plug-in is used for auditing and history tracking. For long sequences of text, simply noting that something has changed is not sufficient. If one word out of 1000 has changed there needs to be a way to cleanly highlight that inline.

Key Features & Functionality

Contains a text comparison function that provides a redlined output in the form of a list of easily readable dictionaries. The function splits text on whitespace and compares the list of sub-strings using a least-edit-distance algorithm. For this reason, if newline or tab characters must be preserved the text should be manipulated in SAIL prior to running the plug-in.

Anonymous
  • which component has been used in above image to show the result of comparetext ?

  • Release Notes - v1.2.0
    • Resolved issues with comparison when initial or ending words were edited

  • Thanks Wes for getting the side-by-side compare plugin.Will come in very handy for host of use-cases.

  • Hey Ilan,

    Thanks for the great plugin. I am running into an issue when I compare text that has newlines. If the oldText has more chunks than the newText, the plugin throws an error. Can you review the following fix?

    Current code:

    HashMap<TypedValue, TypedValue>[] hmTemp = (HashMap<TypedValue, TypedValue>[]) compareText(i == oldTextChunks.length ? "" : oldTextChunks[i], i == newTextChunks.length ? "" : newTextChunks[i]).getValue();

    Updated code:

    HashMap<TypedValue, TypedValue>[] hmTemp = (HashMap<TypedValue, TypedValue>[]) compareText(i >= oldTextChunks.length ? "" : oldTextChunks[i], i >= newTextChunks.length ? "" : newTextChunks[i]).getValue();

    Thanks,
    Wesley Jones