blob: 6134cef8187bca4942b6a137f1a6612a26fb5492 [file] [log] [blame]
---
layout: post
status: PUBLISHED
published: true
title: Display JSPWiki page differences word-by-word
id: a6fbd2b6-fb52-4e73-b3ca-9e5510812c89
date: '2016-08-08 08:32:19 -0400'
categories: jspwiki
tags:
- configuration
permalink: jspwiki/entry/display_jspwiki_page_differences_word
---
<p>JSPWiki by default displays content differences between page versions line-by-line. This is often not fine-grained enough to easily identify specific changes&mdash;especially in longer pages with lots of content.</p>
<p>In JSPWiki this setting is known as the <em>difference provider</em>. You can configure alternative difference providers, one of which is the <em>ContextualDiffProvider</em>. The ContextualDiffProvider enables displaying of page version differences on a word-by-word basis.</p>
<p>Here's an example of page differences with the default <em>TraditionalDiffProvider</em> enabled:</p>
<p><img src="https://blogs.apache.org/jspwiki/mediaresource/8d1349c8-fc4d-469a-89ed-eae9cb44be3d" alt="Illustrating JSPWiki difference providers" width="890" height="477" /> </p>
<p>Note that while only one word and one character has changed, the entire sentence is highlighted. For comparison here are the same changes with the ContextualDiffProvider enabled:</p>
<p><img src="https://blogs.apache.org/jspwiki/mediaresource/17a67842-f8f8-41a0-bb44-2a2de09cf79e" alt="Illustrating JSPWiki difference providers" width="890" height="477" /> </p></p>
<p>Clicking on the blue highlighted double arrows to the left or right of a change will jump to the previous or next change respectively:</p>
<p> <img src="https://blogs.apache.org/jspwiki/mediaresource/84a37ee5-3c75-49f1-a513-bedffb698691" alt="Jumping between changes using the ContextualDiff provider" /></p>
<p>You can find more information on JSPWiki's difference providers <a title="Information on JSPWiki's difference providers" href="https://jspwiki-wiki.apache.org/Wiki.jsp?page=Configuration#section-Configuration-PageDiffRepresentation" target="_blank">here</a>, and you can make the setting in your <a title="Information on setting custom JSPWiki properties" href="https://jspwiki-wiki.apache.org/Wiki.jsp?page=Documentation#section-Documentation-ConfigurationAndAdministration" target="_blank">jspwiki-custom.properties</a> file.<a href="https://jspwiki-wiki.apache.org/Wiki.jsp?page=Configuration#section-Configuration-PageDiffRepresentation"><br /></a></p>
<p></p>