A new script service is available to compute the visual changes between two HTML fragments:

<div class="html-diff">
  #set ($htmlDiff = $services.diff.html.unified($previousHTML, $nextHTML))
  #if ($htmlDiff == '')
    No changes.
  #elseif ("$!htmlDiff" == '')
    Failed to compute the changes.
  #else
    $htmlDiff
  #end
</div>

Checkout the Diff Module's documentation for more information.

Tags:
   

Get Connected